From owner-svn-ports-all@FreeBSD.ORG Sat Jul 6 07:18:37 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5D37856C; Sat, 6 Jul 2013 07:18:37 +0000 (UTC) (envelope-from Cy.Schubert@komquats.com) Received: from smtp-out-03.shaw.ca (smtp-out-03.shaw.ca [64.59.136.139]) by mx1.freebsd.org (Postfix) with ESMTP id 092111B96; Sat, 6 Jul 2013 07:18:36 +0000 (UTC) X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=aTVRNjW1y6NjoOpVf0TT9V0PHXDfZZQvid8DyjJaX1w= c=1 sm=1 a=M2G-30rFWU8A:10 a=QrugwKR0C_UA:10 a=wAGQQ9Az6v0A:10 a=BLceEmwcHowA:10 a=ICAaq7hcmGcA:10 a=kj9zAlcOel0A:10 a=IbtKDeXwb2+SRU442/pi3A==:17 a=6I5d2MoRAAAA:8 a=p2QsaepqAAAA:8 a=nKsjC9ClAAAA:8 a=BWvPGDcYAAAA:8 a=q07veBEC7Qlokiw__OcA:9 a=CjuIK1q_8ugA:10 a=V7tsTZBp22UA:10 a=SV7veod9ZcQA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO spqr.komquats.com) ([96.50.7.119]) by smtp-out-03.shaw.ca with ESMTP; 06 Jul 2013 01:18:36 -0600 Received: from slippy.cwsent.com (slippy2 [10.1.3.91]) by spqr.komquats.com (Postfix) with ESMTP id 1220380; Sat, 6 Jul 2013 00:18:36 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.7/8.14.7) with ESMTP id r667IZF7048210; Sat, 6 Jul 2013 00:18:35 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201307060718.r667IZF7048210@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.5 From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Bernhard Froehlich Subject: Re: svn commit: r322228 - in head/emulators/virtualbox-ose: . files In-Reply-To: Message from Bernhard Froehlich of "Wed, 03 Jul 2013 12:56:48 -0000." <201307031256.r63CumMZ068599@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 06 Jul 2013 00:18:35 -0700 Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Cy Schubert List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2013 07:18:37 -0000 In message <201307031256.r63CumMZ068599@svn.freebsd.org>, Bernhard Froehlich wr ites: > Author: decke > Date: Wed Jul 3 12:56:48 2013 > New Revision: 322228 > URL: http://svnweb.freebsd.org/changeset/ports/322228 > > Log: > - Changing RAM for a VM was broken in the GUI because there was no > implementation for FreeBSD that could calculate available RAM. > > PR: ports/180086 > Submitted by: Martin Birgmeier Previously I replied that this patch didn't work for me. The following did work. Index: Makefile =================================================================== --- Makefile (revision 322363) +++ Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= virtualbox-ose DISTVERSION= 4.2.14 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ http://tmp.chruetertee.ch/ \ Index: files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd .cpp =================================================================== --- files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cp p (revision 322363) +++ files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cp p (working copy) @@ -1,6 +1,6 @@ ---- ./src/VBox/Runtime/r3/freebsd/RTSystemQueryTotalRam-freebsd.cpp.ORIG 2013-06-30 09:27:59.000000000 +0200 -+++ ./src/VBox/Runtime/r3/freebsd/RTSystemQueryTotalRam-freebsd.cpp 2013-06-30 09:51:29.000000000 +0200 -@@ -0,0 +1,80 @@ +--- src/VBox/Runtime/r3/freebsd/RTSystemQueryTotalRam-freebsd.cpp.orig 2013-07-05 20:24:41.691718725 -0700 ++++ src/VBox/Runtime/r3/freebsd/RTSystemQueryTotalRam-freebsd.cpp 2013-07-05 23:24:19.810482426 -0700 +@@ -0,0 +1,70 @@ +/* $Id: RTSystemQueryTotalRam-freebsd.cpp $ */ +/** @file + * IPRT - RTSystemQueryTotalRam, FreeBSD style @@ -54,12 +54,7 @@ + mib[1] = HW_PHYSMEM; /* HW_REALMEM is also possible, but + includes non-main memory as well */ + *pcb = 0; -+ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) { -+ if (pcblen == sizeof(*pcb)) -+ return VINF_SUCCESS; -+ else -+ return VERR_NO_MEMORY; /* XXX */ -+ } ++ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) return VINF_SUCCESS; + return RTErrConvertFromErrno(errno); +} + @@ -73,11 +68,6 @@ + mib[0] = CTL_HW; + mib[1] = HW_USERMEM; + *pcb = 0; -+ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) { -+ if (pcblen == sizeof(*pcb)) -+ return VINF_SUCCESS; -+ else -+ return VERR_NO_MEMORY; /* XXX */ -+ } ++ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) return VINF_SUCCESS; + return RTErrConvertFromErrno(errno); +} -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.