Mercurial > gnulib
changeset 18255:93e9ece52a3c
mountlist: recognize autofs-mounted remote file systems, too
Originally reported at: https://bugzilla.redhat.com/1309247
* lib/mountlist.c (ME_REMOTE): Return true if a file system is named
"-hosts" because it is used by autofs to mount remote file systems.
author | Kamil Dudka <kdudka@redhat.com> |
---|---|
date | Fri, 19 Feb 2016 10:41:49 +0100 |
parents | 99a90e204b61 |
children | 6492e1ca2d5b |
files | ChangeLog lib/mountlist.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Feb 19 17:07:48 2016 -0800 +++ b/ChangeLog Fri Feb 19 10:41:49 2016 +0100 @@ -1,3 +1,10 @@ +2016-02-19 Kamil Dudka <kdudka@redhat.com> + + mountlist: recognize autofs-mounted remote file systems, too + Originally reported at: https://bugzilla.redhat.com/1309247 + * lib/mountlist.c (ME_REMOTE): Return true if a file system is named + "-hosts" because it is used by autofs to mount remote file systems. + 2016-02-19 Paul Eggert <eggert@cs.ucla.edu> signbit: port to C++ with GCC 6
--- a/lib/mountlist.c Fri Feb 19 17:07:48 2016 -0800 +++ b/lib/mountlist.c Fri Feb 19 10:41:49 2016 +0100 @@ -217,13 +217,15 @@ #ifndef ME_REMOTE /* A file system is "remote" if its Fs_name contains a ':' - or if (it is of type (smbfs or cifs) and its Fs_name starts with '//'). */ + or if (it is of type (smbfs or cifs) and its Fs_name starts with '//') + or Fs_name is equal to "-hosts" (used by autofs to mount remote fs). */ # define ME_REMOTE(Fs_name, Fs_type) \ (strchr (Fs_name, ':') != NULL \ || ((Fs_name)[0] == '/' \ && (Fs_name)[1] == '/' \ && (strcmp (Fs_type, "smbfs") == 0 \ - || strcmp (Fs_type, "cifs") == 0))) + || strcmp (Fs_type, "cifs") == 0)) \ + || (strcmp("-hosts", Fs_name) == 0)) #endif #if MOUNTED_GETMNTINFO