Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 2014 15:19:09 +0000 (UTC)
From:      Juergen Lock <nox@FreeBSD.org>
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
Message-ID:  <201411291519.sATFJ9lJ042278@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sson@FreeBSD.org>
+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;
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411291519.sATFJ9lJ042278>