diff options
Diffstat (limited to 'src/basic/mount-util.c')
-rw-r--r-- | src/basic/mount-util.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c index fefa50709c..d04e7492e5 100644 --- a/src/basic/mount-util.c +++ b/src/basic/mount-util.c @@ -483,3 +483,26 @@ int mount_move_root(const char *path) { return 0; } + +bool fstype_is_network(const char *fstype) { + static const char table[] = + "afs\0" + "cifs\0" + "smbfs\0" + "sshfs\0" + "ncpfs\0" + "ncp\0" + "nfs\0" + "nfs4\0" + "gfs\0" + "gfs2\0" + "glusterfs\0"; + + const char *x; + + x = startswith(fstype, "fuse."); + if (x) + fstype = x; + + return nulstr_contains(table, fstype); +} |