summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-12-13 10:07:21 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2013-12-13 11:01:30 +0100
commitae04256ee85fa02288f34587faad5d461ad57186 (patch)
treed9ac269d7dca5babeb13e249bbd88bd5d5eba032
parent8e1b6ab073a890cc2da6965f9a57bfc91d8c6d38 (diff)
utils/mount: fix autodetection of fat file systems
mount uses libblkid (if available) to detect the file system type when using mount -t auto. libblkid calls fat file systems "vfat", our fat translator is called "fatfs". Fix this discrepancy in mount. * utils/mount.c (do_mount): Fix autodetection of fat file systems.
-rw-r--r--utils/mount.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/mount.c b/utils/mount.c
index 04519da2..df77c66f 100644
--- a/utils/mount.c
+++ b/utils/mount.c
@@ -1,6 +1,6 @@
/* Roughly Unix/Linux-compatible `mount' frontend for Hurd translators.
- Copyright (C) 1999, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004, 2013 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -353,7 +353,10 @@ do_mount (struct fs *fs, int remount)
}
else
{
- fs->mntent.mnt_type = strdup (type);
+ if (strcmp (type, "vfat") == 0)
+ fs->mntent.mnt_type = strdup ("fat");
+ else
+ fs->mntent.mnt_type = strdup (type);
if (! fs->mntent.mnt_type)
error (3, ENOMEM, "failed to allocate memory");
}