sd-device: make devpath check stricter
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 18 Feb 2021 15:41:08 +0000 (00:41 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 12 Feb 2024 15:37:49 +0000 (16:37 +0100)
commitadc605b546acd5fe88b020e0c53f03b7dd850d79
treeac5966d578580751893fbdc8462f44fd8af0e9e8
parent01c1b452fd59c96e6234c4e7055c0df6e5e8b763
sd-device: make devpath check stricter

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>
src/libsystemd/sd-device/sd-device.c