summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-02-19 00:41:08 +0900
committerYoungjae Cho <y0.cho@samsung.com>2023-11-03 11:01:17 +0900
commit27fcee36f95f4a0475b8b5f2e7c08024b942cf95 (patch)
tree37da34e976ad7db004b8482223fb584586bdfa9b
parenta31178bd70164b1fc11624d926e1002b34b0efff (diff)
downloadsystemd-accepted/tizen_unified_riscv.tar.gz
systemd-accepted/tizen_unified_riscv.tar.bz2
systemd-accepted/tizen_unified_riscv.zip
See assertion in sd_device_get_devpath(). (Backporting comment) There sometimes and empty devpath comes from the function. See the deviced commit, 2628c5aed5c0e712e1fbd7d571ef0b640f5afbec. Original: upstream, https://github.com/systemd/systemd/pull/18684 Change-Id: I29816219b3fc40eb13c1bf4bbb5d84b9782da333 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
-rw-r--r--src/libsystemd/sd-device/sd-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
index 04696f4bc1..7a93125c2f 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
@@ -201,7 +201,7 @@ int device_set_syspath(sd_device *device, const char *_syspath, bool verify) {
devpath = syspath + STRLEN("/sys");
- if (devpath[0] == '\0')
+ if (devpath[0] != '/')
/* '/sys' alone is not a valid device path */
return -ENODEV;