sd-device: support the case that /sys is a symlink
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 7 Jan 2018 16:36:08 +0000 (01:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 7 Jan 2018 16:36:08 +0000 (01:36 +0900)
commit2e1ec12ec3329dddaa74d3ae1e819505166fe9ad
treeb9648731254112fa89a12c652f5e5f4287baa070
parent5bbe8eab3443169a496d6b287e7c2291d63cd115
sd-device: support the case that /sys is a symlink

When /sys is a symlink to the sysfs mountpoint, e.g. /path/to/sysfs.
Then, device->syspath was set to like /path/to/sysfs/devices/foo/baz.
This converts the path to /sys/devices/foo/baz.

Fixes #7676.
src/libsystemd/sd-device/sd-device.c