From owner-svn-ports-all@FreeBSD.ORG Sat Nov 29 15:19:10 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D92F49A0; Sat, 29 Nov 2014 15:19:09 +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 BA89B20C; Sat, 29 Nov 2014 15:19:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATFJ94r042279; Sat, 29 Nov 2014 15:19:09 GMT (envelope-from nox@FreeBSD.org) Received: (from nox@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATFJ9lJ042278; Sat, 29 Nov 2014 15:19:09 GMT (envelope-from nox@FreeBSD.org) Message-Id: <201411291519.sATFJ9lJ042278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nox set sender to nox@FreeBSD.org using -f From: Juergen Lock Date: Sat, 29 Nov 2014 15:19:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r373627 - 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.18-1 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, 29 Nov 2014 15:19:10 -0000 Author: nox Date: Sat Nov 29 15:19:08 2014 New Revision: 373627 URL: https://svnweb.freebsd.org/changeset/ports/373627 QAT: https://qat.redports.org/buildarchive/r373627/ Log: - bsd-user: fix hw.machine and hw.machine_arch sysctls for a NULL buffer. - Bump PORTREVISION. Submitted by: sson Obtained from: https://github.com/seanbruno/qemu-bsd-user/commit/8267ad2cb92b106bb16e91234f04abc49ab32036 Added: head/emulators/qemu-devel/files/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 (contents, props changed) Modified: head/emulators/qemu-devel/Makefile Modified: head/emulators/qemu-devel/Makefile ============================================================================== --- head/emulators/qemu-devel/Makefile Sat Nov 29 15:15:55 2014 (r373626) +++ head/emulators/qemu-devel/Makefile Sat Nov 29 15:19:08 2014 (r373627) @@ -3,7 +3,7 @@ PORTNAME= qemu PORTVERSION= 2.0.2 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -98,6 +98,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch- EXTRA_PATCHES+= ${FILESDIR}/extra-patch-a8dc4de7f73bc6f8363c0fc81c4c6e53733c444b EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-freebsd-os-socket.h EXTRA_PATCHES+= ${FILESDIR}/extra-patch-cab0d36ffd4e70b1879dc2cf860c975a7965afc3 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 .endif CONFIGURE_ARGS+= --localstatedir=/var Added: head/emulators/qemu-devel/files/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qemu-devel/files/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 Sat Nov 29 15:19:08 2014 (r373627) @@ -0,0 +1,33 @@ +From 8267ad2cb92b106bb16e91234f04abc49ab32036 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Wed, 26 Nov 2014 21:07:00 +0000 +Subject: [PATCH] Bug fix for hw.machine and hw.machine_arch sysctl's. + +For a NULL buffer sysctl needs to return just the length of the buffer. +--- + bsd-user/freebsd/os-sys.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/bsd-user/freebsd/os-sys.c b/bsd-user/freebsd/os-sys.c +index 3ab4f8e..dbdc9ef 100644 +--- a/bsd-user/freebsd/os-sys.c ++++ b/bsd-user/freebsd/os-sys.c +@@ -336,12 +336,16 @@ abi_long do_freebsd_sysctl(CPUArchState *env, abi_ulong namep, int32_t namelen, + case CTL_HW: + switch (snamep[1]) { + case HW_MACHINE: +- strlcpy(holdp, TARGET_HW_MACHINE, oldlen); ++ holdlen = sizeof(TARGET_HW_MACHINE); ++ if (holdp) ++ strlcpy(holdp, TARGET_HW_MACHINE, oldlen); + ret = 0; + goto out; + + case HW_MACHINE_ARCH: +- strlcpy(holdp, TARGET_HW_MACHINE_ARCH, oldlen); ++ holdlen = sizeof(TARGET_HW_MACHINE_ARCH); ++ if (holdp) ++ strlcpy(holdp, TARGET_HW_MACHINE_ARCH, oldlen); + ret = 0; + goto out; +