Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/filesystems/libblkid/files/patch-libblkid_src_devname.c
17780 views
1
--- libblkid/src/devname.c.orig 2025-06-24 07:55:28 UTC
2
+++ libblkid/src/devname.c
3
@@ -224,7 +224,11 @@ static void probe_one(blkid_cache cache, const char *p
4
5
if (stat(device, &st) == 0 &&
6
(S_ISBLK(st.st_mode) ||
7
- (S_ISCHR(st.st_mode) && !strncmp(ptname, "ubi", 3))) &&
8
+ (S_ISCHR(st.st_mode)
9
+#ifdef __linux__
10
+ && !strncmp(ptname, "ubi", 3)
11
+#endif
12
+ )) &&
13
st.st_rdev == devno) {
14
devname = strdup(device);
15
goto get_dev;
16
@@ -251,8 +255,12 @@ set_pri:
17
dev->bid_pri = BLKID_PRI_DM;
18
if (is_dm_leaf(ptname))
19
dev->bid_pri += 5;
20
- } else if (!strncmp(ptname, "md", 2))
21
- dev->bid_pri = BLKID_PRI_MD;
22
+ } else {
23
+#ifdef __linux__
24
+ if (!strncmp(ptname, "md", 2))
25
+ dev->bid_pri = BLKID_PRI_MD;
26
+#endif
27
+ }
28
if (removable)
29
dev->bid_flags |= BLKID_BID_FL_REMOVABLE;
30
}
31
32