diff options
author | Daniel Braunwarth <daniel@braunwarth.dev> | 2022-08-28 20:02:50 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-08-29 13:47:56 +0900 |
commit | 1037178acfd093fb10d8f5e74f3072f78afdf7e8 (patch) | |
tree | 8e1930fbd1c5e197ed6393257e600f4da9500601 /src | |
parent | b72e5d9d8ef17d87b4e94c370e90545e47053329 (diff) | |
download | systemd-1037178acfd093fb10d8f5e74f3072f78afdf7e8.tar.gz |
condition: fix device-tree firmware path
The path /sys/firmware/device-tree doesn't exist. This should be either
/proc/device-tree or /sys/firmware/devicetree.
The first path is only a link. So lets use the second path.
See https://github.com/torvalds/linux/blob/v4.14/drivers/of/base.c#L218.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/condition.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/condition.c b/src/shared/condition.c index 5c6e383679..27a0a465be 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -649,9 +649,9 @@ static int condition_test_firmware(Condition *c, char **env) { assert(c->type == CONDITION_FIRMWARE); if (streq(c->parameter, "device-tree")) { - if (access("/sys/firmware/device-tree/", F_OK) < 0) { + if (access("/sys/firmware/devicetree/", F_OK) < 0) { if (errno != ENOENT) - log_debug_errno(errno, "Unexpected error when checking for /sys/firmware/device-tree/: %m"); + log_debug_errno(errno, "Unexpected error when checking for /sys/firmware/devicetree/: %m"); return false; } else return true; |