diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-10 17:41:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-10 18:00:33 +0200 |
commit | 42856c1093c1644d31b83d7a131bfe4b061c5e4d (patch) | |
tree | 460286dbe051c9bdfe75681c7648faf36e03d02a /util.c | |
parent | 1adf1049dc9def8d8df405bab7f5ae08e1e9573d (diff) |
util: introduce fstype_is_network()
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1276,6 +1276,24 @@ char *format_timestamp(char *buf, size_t l, usec_t t) { return buf; } +bool fstype_is_network(const char *fstype) { + static const char * const table[] = { + "cifs", + "smbfs", + "ncpfs", + "nfs", + "nfs4" + }; + + unsigned i; + + for (i = 0; i < ELEMENTSOF(table); i++) + if (streq(table[i], fstype)) + return true; + + return false; +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime", |