diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-05-16 18:13:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-05-16 18:13:58 +0200 |
commit | 8407a5d0183d9513349754f1eac86e2fdec8bd76 (patch) | |
tree | 23f0ef1f45dfb5a0d904f215973a062045547e0b /util.c | |
parent | d4e6a6f66b7b3c797a1446816b8512d82c92278f (diff) |
swap: don't add mount links for swap devices
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1927,6 +1927,16 @@ bool is_clean_exit(int code, int status) { return false; } +bool is_device_path(const char *path) { + + /* Returns true on paths that refer to a device, either in + * sysfs or in /dev */ + + return + path_startswith(path, "/dev/") || + path_startswith(path, "/sys/"); +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime", |