diff options
author | Juergen Lock <nox@FreeBSD.org> | 2015-01-06 19:47:28 +0000 |
---|---|---|
committer | Juergen Lock <nox@FreeBSD.org> | 2015-01-06 19:47:28 +0000 |
commit | dbc8d4a8be751066be977999cb8e6bd9d56cd6e6 (patch) | |
tree | 98ea2e3e5e43b906f6267887acd9ac55a87c2af4 /emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages | |
parent | Update to GNU Chess 6.2.1 (diff) |
- Update emulators/qemu-sbruno to latest github snapshot, fixing
the bsd-user targets on 8 and 9.
- Switch emulators/qemu-user-static to be slave of emulators/qemu-sbruno.
- Update emulators/qemu-devel to latest upstream release 2.2.0, now
w/o bsd-user patches and knob again. (Or at least until the
patches are merged upstream...) [1]
- Add appropriate CONFLICTS to emulators/qemu too and bump its
PORTREVISION.
Suggested by: andrew [1] (for the benefit of testing aarch64 guests)
Notes
Notes:
svn path=/head/; revision=376437
Diffstat (limited to 'emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages')
-rw-r--r-- | emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages b/emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages deleted file mode 100644 index 5253802430bc..000000000000 --- a/emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages +++ /dev/null @@ -1,63 +0,0 @@ -From nox Mon Sep 17 00:00:00 2001 -From: Juergen Lock <nox@jelal.kn-bremen.de> -Date: 05 Apr 2014 21:06:00 +0200 -Subject: Fix bsd-user FreeBSD hw.availpages sysctl - -hw.availpages is defined as OID_AUTO so the mib can change; find out -it's value at the first hw.* sysctl syscall. - -Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> - ---- a/bsd-user/freebsd/os-sys.c -+++ b/bsd-user/freebsd/os-sys.c -@@ -219,24 +219,36 @@ abi_long do_freebsd_sysctl(CPUArchState - ret = 0; - goto out; - -- case 851: /* hw.availpages */ -+ default: - { -- long lvalue; -- size_t len = sizeof(lvalue); -+ static int oid_hw_availpages; -+ -+ if (!oid_hw_availpages) { -+ int real_oid[CTL_MAXNAME+2]; -+ size_t len = sizeof(real_oid) / sizeof(int); - -- if (sysctlbyname("hw.availpages", &lvalue, &len, NULL, 0) -- == -1) { -- ret = -1; -- } else { -- (*(abi_ulong *)holdp) = tswapal((abi_ulong)lvalue); -- holdlen = sizeof(abi_ulong); -- ret = 0; -+ if (sysctlnametomib("hw.availpages", real_oid, &len) >= 0) -+ oid_hw_availpages = real_oid[1]; - } -- } -- goto out; - -- default: -- break; -+ if (oid_hw_availpages && snamep[1] == oid_hw_availpages) { -+ long lvalue; -+ size_t len = sizeof(lvalue); -+ -+ if (sysctlbyname("hw.availpages", &lvalue, &len, NULL, 0) -+ == -1) { -+ ret = -1; -+ } else { -+ if (oldlen) { -+ (*(abi_ulong *)holdp) = tswapal((abi_ulong)lvalue); -+ } -+ holdlen = sizeof(abi_ulong); -+ ret = 0; -+ } -+ goto out; -+ } -+ break; -+ } - } - default: - break; |