From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5M2c-0005Sx-13 for qemu-devel@nongnu.org; Fri, 02 Aug 2013 16:33:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5M2U-0004nN-On for qemu-devel@nongnu.org; Fri, 02 Aug 2013 16:33:37 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60313 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5M2U-0004nA-Jj for qemu-devel@nongnu.org; Fri, 02 Aug 2013 16:33:30 -0400 Message-ID: <51FC1794.7010406@suse.de> Date: Fri, 02 Aug 2013 22:33:24 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1374596592-7027-1-git-send-email-imammedo@redhat.com> <1374596592-7027-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1374596592-7027-3-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 02/16] vl: set default ram_size during variable initialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: vasilis.liaskovitis@profitbricks.com, hutao@cn.fujitsu.com, qemu-devel@nongnu.org, pbonzini@redhat.com Am 23.07.2013 18:22, schrieb Igor Mammedov: > Signed-off-by: Igor Mammedov > --- > vl.c | 7 +------ > 1 files changed, 1 insertions(+), 6 deletions(-) >=20 > diff --git a/vl.c b/vl.c > index 8190504..bf0c658 100644 > --- a/vl.c > +++ b/vl.c > @@ -2947,7 +2947,7 @@ int main(int argc, char **argv, char **envp) > module_call_init(MODULE_INIT_MACHINE); > machine =3D find_default_machine(); > cpu_model =3D NULL; > - ram_size =3D 0; > + ram_size =3D DEFAULT_RAM_SIZE * 1024 * 1024; > snapshot =3D 0; > cyls =3D heads =3D secs =3D 0; > translation =3D BIOS_ATA_TRANSLATION_AUTO; > @@ -4064,11 +4064,6 @@ int main(int argc, char **argv, char **envp) > exit(1); > } > =20 > - /* init the memory */ > - if (ram_size =3D=3D 0) { > - ram_size =3D DEFAULT_RAM_SIZE * 1024 * 1024; > - } > - > if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, = NULL, 0) > !=3D 0) { > exit(0); Commit message doesn't give any explanation why? What happens with -m 0? My guess is the old code translates that to the default size, where by intializing the default earlier it would stay. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg