From owner-svn-ports-all@FreeBSD.ORG Sat Apr 5 21:54:50 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7B3FA1C; Sat, 5 Apr 2014 21:54:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8461152; Sat, 5 Apr 2014 21:54:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35Lso9d007318; Sat, 5 Apr 2014 21:54:50 GMT (envelope-from nox@svn.freebsd.org) Received: (from nox@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35LsnZY007311; Sat, 5 Apr 2014 21:54:49 GMT (envelope-from nox@svn.freebsd.org) Message-Id: <201404052154.s35LsnZY007311@svn.freebsd.org> From: Juergen Lock Date: Sat, 5 Apr 2014 21:54:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r350272 - in head/emulators/qemu-devel: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 21:54:50 -0000 Author: nox Date: Sat Apr 5 21:54:49 2014 New Revision: 350272 URL: http://svnweb.freebsd.org/changeset/ports/350272 QAT: https://qat.redports.org/buildarchive/r350272/ Log: - Three more bsd-user fixes: - Fix fchflags(). (typo) [1] - Fix hw.availpages sysctl. [1] - Fix sysctl kern.usrstack and kern.ps_strings invoked from sysctl(8). - Bump PORTREVISION. Reported by: sbruno [1] Added: head/emulators/qemu-devel/files/extra-patch-bsd-user-syscall.c (contents, props changed) head/emulators/qemu-devel/files/extra-patch-sysctl-0oldlen (contents, props changed) head/emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages (contents, props changed) Modified: head/emulators/qemu-devel/Makefile Modified: head/emulators/qemu-devel/Makefile ============================================================================== --- head/emulators/qemu-devel/Makefile Sat Apr 5 21:52:11 2014 (r350271) +++ head/emulators/qemu-devel/Makefile Sat Apr 5 21:54:49 2014 (r350272) @@ -3,7 +3,7 @@ PORTNAME= qemu PORTVERSION= 1.7.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -71,6 +71,9 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch- EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-mips-target_arch_vmparam.h EXTRA_PATCHES+= ${FILESDIR}/extra-patch-inherit-interp_prefix EXTRA_PATCHES+= ${FILESDIR}/extra-patch-d62553b108aa27c0c020dbb771d29f8673807a3b +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-syscall.c +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sysctl-hw-availpages +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sysctl-0oldlen .endif CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib Added: head/emulators/qemu-devel/files/extra-patch-bsd-user-syscall.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qemu-devel/files/extra-patch-bsd-user-syscall.c Sat Apr 5 21:54:49 2014 (r350272) @@ -0,0 +1,11 @@ +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -627,7 +627,7 @@ abi_long do_freebsd_syscall(void *cpu_en + break; + + case TARGET_FREEBSD_NR_fchflags: /* fchflags(2) */ +- ret = do_bsd_fchflags(arg2, arg2); ++ ret = do_bsd_fchflags(arg1, arg2); + break; + + case TARGET_FREEBSD_NR_chroot: /* chroot(2) */ Added: head/emulators/qemu-devel/files/extra-patch-sysctl-0oldlen ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qemu-devel/files/extra-patch-sysctl-0oldlen Sat Apr 5 21:54:49 2014 (r350272) @@ -0,0 +1,24 @@ +--- a/bsd-user/freebsd/os-sys.c ++++ b/bsd-user/freebsd/os-sys.c +@@ -165,7 +165,9 @@ abi_long do_freebsd_sysctl(CPUArchState + switch (snamep[1]) { + case KERN_USRSTACK: + #if TARGET_USRSTACK != 0 +- (*(abi_ulong *)holdp) = tswapal(TARGET_USRSTACK); ++ if (oldlen) { ++ (*(abi_ulong *)holdp) = tswapal(TARGET_USRSTACK); ++ } + holdlen = sizeof(abi_ulong); + ret = 0; + #else +@@ -175,7 +177,9 @@ abi_long do_freebsd_sysctl(CPUArchState + + case KERN_PS_STRINGS: + #if defined(TARGET_PS_STRINGS) +- (*(abi_ulong *)holdp) = tswapal(TARGET_PS_STRINGS); ++ if (oldlen) { ++ (*(abi_ulong *)holdp) = tswapal(TARGET_PS_STRINGS); ++ } + holdlen = sizeof(abi_ulong); + ret = 0; + #else Added: head/emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qemu-devel/files/extra-patch-sysctl-hw-availpages Sat Apr 5 21:54:49 2014 (r350272) @@ -0,0 +1,53 @@ +--- 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;