summaryrefslogtreecommitdiffstats
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-23 16:30:23 +0100
committerLennart Poettering <lennart@poettering.net>2018-11-26 14:08:46 +0100
commit49fe5c099639aa2111efb56c6ac609955a279279 (patch)
treebff451fbe68b0aa57fe8ad198695384eab264545 /src/udev/udevd.c
parentstrv: add new macro STARTSWITH_SET() (diff)
downloadsystemd-49fe5c099639aa2111efb56c6ac609955a279279.tar.xz
systemd-49fe5c099639aa2111efb56c6ac609955a279279.zip
tree-wide: port various places over to STARTSWITH_SET()
Diffstat (limited to '')
-rw-r--r--src/udev/udevd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 6eacfe811f..9c8e7f977f 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -57,6 +57,7 @@
#include "signal-util.h"
#include "socket-util.h"
#include "string-util.h"
+#include "strv.h"
#include "strxcpyx.h"
#include "syslog-util.h"
#include "udev-builtin.h"
@@ -361,9 +362,7 @@ static int worker_lock_block_device(sd_device *dev, int *ret_fd) {
if (r < 0)
return log_device_debug_errno(dev, r, "Failed to get sysname: %m");
- if (startswith(val, "dm-") ||
- startswith(val, "md") ||
- startswith(val, "drbd"))
+ if (STARTSWITH_SET(val, "dm-", "md", "drbd"))
return 0;
r = sd_device_get_devtype(dev, &val);