diff options
author | Kim Hagen <khagen@multi-development.com> | 2014-07-18 10:48:40 +0200 |
---|---|---|
committer | Kim Hagen <khagen@multi-development.com> | 2014-07-18 10:48:40 +0200 |
commit | e29a40eb8a1d823759b8ac2f9c2112b1c3b7ec14 (patch) | |
tree | d6de8268151f8af179dd59af9decec2627f45cd4 | |
parent | eea9772d276e7e7d8307099c9d41e68163ab4c0f (diff) | |
download | vyatta-biosdevname-e29a40eb8a1d823759b8ac2f9c2112b1c3b7ec14.tar.gz vyatta-biosdevname-e29a40eb8a1d823759b8ac2f9c2112b1c3b7ec14.zip |
Skip checking if we are in a vm if cpu is other than x86_64.vyos/1.1.0-beta1
-rw-r--r-- | src/bios_dev_name.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bios_dev_name.c b/src/bios_dev_name.c index ae994ab..1abc6d8 100644 --- a/src/bios_dev_name.c +++ b/src/bios_dev_name.c @@ -125,6 +125,8 @@ parse_opts(int argc, char **argv) opts.prefix = "em"; } +#if defined(__x86_64__) || defined(__i386__) + static u_int32_t cpuid (u_int32_t eax, u_int32_t ecx) { @@ -152,6 +154,14 @@ running_in_virtual_machine (void) return 0; } +#else /* ! __x86_64__ */ +static int +running_in_virtual_machine (void) +{ + return 1; +} +#endif + static int running_as_root(void) { |