[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] utils/mount: fix autodetection of fat file systems
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] utils/mount: fix autodetection of fat file systems |
Date: |
Fri, 13 Dec 2013 10:35:09 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Fri 13 Dec 2013 10:13:00 +0100, a écrit :
> 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.
Ack.
> * utils/mount.c (do_mount): Fix autodetection of fat file systems.
> ---
> utils/mount.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/utils/mount.c b/utils/mount.c
> index 04519da..df77c66 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");
> }
> --
> 1.7.10.4
>
--
Samuel
<d> bah à défaut de ligne TGV, ils ont un GR
-+- #ens-mim - comment ça, paumé ?! -+-