Path: blob/main/filesystems/libblkid/files/patch-libblkid_src_devname.c
17780 views
--- libblkid/src/devname.c.orig 2025-06-24 07:55:28 UTC1+++ libblkid/src/devname.c2@@ -224,7 +224,11 @@ static void probe_one(blkid_cache cache, const char *p34if (stat(device, &st) == 0 &&5(S_ISBLK(st.st_mode) ||6- (S_ISCHR(st.st_mode) && !strncmp(ptname, "ubi", 3))) &&7+ (S_ISCHR(st.st_mode)8+#ifdef __linux__9+ && !strncmp(ptname, "ubi", 3)10+#endif11+ )) &&12st.st_rdev == devno) {13devname = strdup(device);14goto get_dev;15@@ -251,8 +255,12 @@ set_pri:16dev->bid_pri = BLKID_PRI_DM;17if (is_dm_leaf(ptname))18dev->bid_pri += 5;19- } else if (!strncmp(ptname, "md", 2))20- dev->bid_pri = BLKID_PRI_MD;21+ } else {22+#ifdef __linux__23+ if (!strncmp(ptname, "md", 2))24+ dev->bid_pri = BLKID_PRI_MD;25+#endif26+ }27if (removable)28dev->bid_flags |= BLKID_BID_FL_REMOVABLE;29}303132