summaryrefslogtreecommitdiff
path: root/lib/mountlist.c
diff options
context:
space:
mode:
authorMarc Dionne <marc.dionne@auristor.com>2020-02-05 13:35:12 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2020-02-05 13:46:51 -0800
commit7a15069b68a376f26c5dca34ae2689c5bf8adc99 (patch)
treeab7911d837b880c6ce9a7213acdfa9eee00b2ad9 /lib/mountlist.c
parent4e9bc44061b93871d9b0166e2c93ef4225fa1bac (diff)
downloadgnulib-7a15069b68a376f26c5dca34ae2689c5bf8adc99.tar.gz
mountlist: Consider AFS filesystems as remote
df --local relies on the ME_REMOTE macro to determine if a given mount entry should be considered "local". There is special logic for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the kernel's kafs module or AuriStorFS is treated as a local mount. * lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs' (OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote. Copyright-paperwork-exempt: yes
Diffstat (limited to 'lib/mountlist.c')
-rw-r--r--lib/mountlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 61063ce91c..255e350e0b 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -221,6 +221,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
#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 (afs or auristorfs)
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 \
@@ -228,6 +229,8 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
&& (Fs_name)[1] == '/' \
&& (strcmp (Fs_type, "smbfs") == 0 \
|| strcmp (Fs_type, "cifs") == 0)) \
+ || strcmp (Fs_type, "afs") == 0 \
+ || strcmp (Fs_type, "auristorfs") == 0 \
|| (strcmp("-hosts", Fs_name) == 0))
#endif