summaryrefslogtreecommitdiff
path: root/src/basic/mount-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-27 13:45:00 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:45:53 +0100
commit4e036b7a96b7a72461bdb68ded304041e892b8eb (patch)
tree8b1b79bb8e1ca4e715f1fd6ec3e643567e690996 /src/basic/mount-util.c
parent5e524b404b7b319aa6a24bf21132b1074b206996 (diff)
mount-util: move fstype_is_network() and name_to_handle_at() definitions over
Diffstat (limited to 'src/basic/mount-util.c')
-rw-r--r--src/basic/mount-util.c23
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);
+}