Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2013 17:57:08 +0000 (UTC)
From:      Bernhard Froehlich <decke@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r322726 - in head/emulators/virtualbox-ose: . files
Message-ID:  <201307101757.r6AHv8Tn027904@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: decke
Date: Wed Jul 10 17:57:07 2013
New Revision: 322726
URL: http://svnweb.freebsd.org/changeset/ports/322726

Log:
  - Fix querying total and available RAM on i386
  
  Submitted by:	Cy Schubert <cy@FreeBSD.org>

Modified:
  head/emulators/virtualbox-ose/Makefile
  head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp

Modified: head/emulators/virtualbox-ose/Makefile
==============================================================================
--- head/emulators/virtualbox-ose/Makefile	Wed Jul 10 17:57:00 2013	(r322725)
+++ head/emulators/virtualbox-ose/Makefile	Wed Jul 10 17:57:07 2013	(r322726)
@@ -3,6 +3,7 @@
 
 PORTNAME=	virtualbox-ose
 DISTVERSION=	4.2.16
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
 		http://tmp.chruetertee.ch/ \

Modified: head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp	Wed Jul 10 17:57:00 2013	(r322725)
+++ head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp	Wed Jul 10 17:57:07 2013	(r322726)
@@ -55,7 +55,7 @@
 +				   includes non-main memory as well */
 +    *pcb = 0;
 +    if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) {
-+	if (pcblen == sizeof(*pcb))
++	if (pcblen == sizeof(*pcb) || pcblen == sizeof(uint32_t))
 +	    return VINF_SUCCESS;
 +	else
 +	    return VERR_NO_MEMORY;	/* XXX */
@@ -74,7 +74,7 @@
 +    mib[1] = HW_USERMEM;
 +    *pcb = 0;
 +    if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) {
-+	if (pcblen == sizeof(*pcb))
++	if (pcblen == sizeof(*pcb) || pcblen == sizeof(uint32_t))
 +	    return VINF_SUCCESS;
 +	else
 +	    return VERR_NO_MEMORY;	/* XXX */



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