summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-16 18:13:58 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-16 18:13:58 +0200
commit8407a5d0183d9513349754f1eac86e2fdec8bd76 (patch)
tree23f0ef1f45dfb5a0d904f215973a062045547e0b /util.c
parentd4e6a6f66b7b3c797a1446816b8512d82c92278f (diff)
swap: don't add mount links for swap devices
Diffstat (limited to 'util.c')
-rw-r--r--util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.c b/util.c
index 5e3654d1d1..f7d538aaac 100644
--- a/util.c
+++ b/util.c
@@ -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",