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>
devpath = syspath + STRLEN("/sys");
- if (devpath[0] == '\0')
+ if (devpath[0] != '/')
/* '/sys' alone is not a valid device path */
return -ENODEV;