diff options
author | Andrew Jones <drjones@redhat.com> | 2015-03-31 11:08:11 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-03-31 15:36:53 +0200 |
commit | b8f1df82646d27452ba2ee9f843df42ee7a2c002 (patch) | |
tree | f83a7acec626a5513f6b1b0786a9f964d2c176b5 /src | |
parent | c87664fef45fc1dadc2303675ed357e0dde61db9 (diff) |
detect-virt: use /proc/device-tree
Kernel doc Documentation/ABI/testing/sysfs-firmware-ofw says that
the /proc/device-tree symlink should be used, as opposed to
directly accessing /sys/firmware/devicetree/base. The former is
ABI, but not the later.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/virt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/virt.c b/src/shared/virt.c index 7c1381f4b8..aa3501f429 100644 --- a/src/shared/virt.c +++ b/src/shared/virt.c @@ -106,7 +106,7 @@ static int detect_vm_devicetree(const char **_id) { _cleanup_free_ char *hvtype = NULL; int r; - r = read_one_line_file("/sys/firmware/devicetree/base/hypervisor/compatible", &hvtype); + r = read_one_line_file("/proc/device-tree/hypervisor/compatible", &hvtype); if (r >= 0) { if (streq(hvtype, "linux,kvm")) { *_id = "kvm"; |