Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen don't pay for sysctl if we don't have to.
details: https://anonhg.NetBSD.org/src/rev/1b1695d1aefa
branches: trunk
changeset: 786046:1b1695d1aefa
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 12 17:21:04 2013 +0000
description:
don't pay for sysctl if we don't have to.
diffstat:
tests/lib/libc/gen/isqemu.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 7dd0cf6afacb -r 1b1695d1aefa tests/lib/libc/gen/isqemu.h
--- a/tests/lib/libc/gen/isqemu.h Fri Apr 12 17:18:11 2013 +0000
+++ b/tests/lib/libc/gen/isqemu.h Fri Apr 12 17:21:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isqemu.h,v 1.1 2013/04/12 17:13:54 christos Exp $ */
+/* $NetBSD: isqemu.h,v 1.2 2013/04/12 17:21:04 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -40,6 +40,7 @@
static bool
isQEMU(void) {
+#if defined(__i386__) || defined(__x86_64__)
char name[1024];
size_t len = sizeof(name);
@@ -49,6 +50,9 @@
err(EXIT_FAILURE, "sysctl");
}
return strstr(name, "QEMU") != NULL;
+#else
+ return false;
+#endif
}
#ifdef TEST
Home |
Main Index |
Thread Index |
Old Index