From: Andrew Jones Date: Tue, 31 Mar 2015 09:08:11 +0000 (+0200) Subject: detect-virt: use /proc/device-tree X-Git-Tag: v220~632 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8f1df82646d27452ba2ee9f843df42ee7a2c002;p=platform%2Fupstream%2Fsystemd.git 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. --- diff --git a/src/shared/virt.c b/src/shared/virt.c index 7c1381f..aa3501f 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";