2007-01-30 15:22:03 +01:00
|
|
|
--- mkdosfs/mkdosfs.c
|
|
|
|
+++ mkdosfs/mkdosfs.c
|
2007-01-16 00:10:35 +01:00
|
|
|
@@ -592,11 +592,15 @@
|
|
|
|
FILE *f;
|
|
|
|
struct mntent *mnt;
|
|
|
|
|
|
|
|
- if ((f = setmntent (MOUNTED, "r")) == NULL)
|
|
|
|
- return;
|
|
|
|
+ if ((f = setmntent ("/proc/mounts", "r")) == NULL)
|
|
|
|
+ if ((f = setmntent (MOUNTED, "r")) == NULL)
|
|
|
|
+ return;
|
|
|
|
while ((mnt = getmntent (f)) != NULL)
|
|
|
|
if (strcmp (device_name, mnt->mnt_fsname) == 0)
|
|
|
|
- die ("%s contains a mounted file system.");
|
|
|
|
+ if (strcmp ("subfs", mnt->mnt_type) != 0)
|
|
|
|
+ die ("%s contains a mounted file system.");
|
|
|
|
+ else
|
|
|
|
+ printf("Device mounted using subfs, please do not access it while creating filesystem\n");
|
|
|
|
endmntent (f);
|
|
|
|
}
|
|
|
|
|