diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-09 10:28:43 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-11 04:42:50 +0900 |
commit | c6dce5720c409129319ccd26e4d1b7f8a17cc563 (patch) | |
tree | 2c6232cf4f69b785a3a5cc3557ec86e3e0520b0f | |
parent | e6cbe6970f8e642a2229e0631eaa743fa86fcd29 (diff) | |
download | systemd-c6dce5720c409129319ccd26e4d1b7f8a17cc563.tar.gz |
condition: use /proc/device-tree/
-rw-r--r-- | src/shared/condition.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/shared/condition.c b/src/shared/condition.c index 1d28f7ba57..3e6ae79553 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -509,7 +509,7 @@ static int condition_test_architecture(Condition *c, char **env) { return a == b; } -#define DTCOMPAT_FILE "/sys/firmware/devicetree/base/compatible" +#define DTCOMPAT_FILE "/proc/device-tree/compatible" static int condition_test_firmware_devicetree_compatible(const char *dtcarg) { int r; _cleanup_free_ char *dtcompat = NULL; @@ -530,11 +530,8 @@ static int condition_test_firmware_devicetree_compatible(const char *dtcarg) { return false; } - /* - * /sys/firmware/devicetree/base/compatible consists of one or more - * strings, each ending in '\0'. So the last character in dtcompat must - * be a '\0'. - */ + /* /proc/device-tree/compatible consists of one or more strings, each ending in '\0'. + * So the last character in dtcompat must be a '\0'. */ if (dtcompat[size - 1] != '\0') { log_debug("%s is in an unknown format, assuming machine is incompatible", DTCOMPAT_FILE); return false; |