>>> On 9/30/2008 at 8:39 AM, in message <200809301439.42559.list2008@xxxxxxxxxxxx>, Andrew McGill <list2008@xxxxxxxxxxxx> wrote: > On Monday 29 September 2008 15:17:28 Matthias Koenig wrote: >> + * First check if we are running in a para-virtualized guest. >> + */ >> + if ((!access("/sys/hypervisor", F_OK) || >> + (!access("/proc/xen", F_OK)))) { >> + /* >> + * For now we are only dealing with para-virtualized >> + * Linux guests (para-virtualized on Xen). So, this must be >> + * Xen based. >> + */ >> + xen_pv = 1; >> + } > This code does not appear to consider the possibility of running on real > hardware. (And to be pedantic, if /sys and /proc are not mounted, strange > things will happen.) This check is only to detect if we have a para-virtualized guest. We will need to expand this check once we properly populate sys/hypervisor. The tool does detect if the guest is running on bare hardware. Regards, K. Y > > &:-) -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html