X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=util.c;h=f3161bd7f3e888b4a4b34e8ded2b1a4fde652f13;hb=97c4f35cd541baa2f985ff702a5b9f0b8b524a53;hp=52ca5e25631a9e56f8fd5e27df7c63d777b6d50a;hpb=8b6c71206d32b11683e5e7cebc9acb467ba01b38;p=elogind.git diff --git a/util.c b/util.c index 52ca5e256..f3161bd7f 100644 --- a/util.c +++ b/util.c @@ -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",