From: Igor Mammedov <imammedo@redhat.com>
To: Kirill Batuzov <batuzovk@ispras.ru>
Cc: marcel.a@redhat.com, mst@redhat.com, qemu-devel@nongnu.org,
agraf@suse.de, pbonzini@redhat.com, afaerber@suse.de,
stefano.stabellini@eu.citrix.com
Subject: Re: [Qemu-devel] [PATCH 3/4] machine: convert ram_size, maxram_size, ram_slots to properties
Date: Wed, 25 Jun 2014 16:45:15 +0200 [thread overview]
Message-ID: <20140625164515.2e435fc0@nial.usersys.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1406251747550.4254@bulbul.intra.ispras.ru>
On Wed, 25 Jun 2014 18:09:52 +0400 (MSK)
Kirill Batuzov <batuzovk@ispras.ru> wrote:
> On Wed, 25 Jun 2014, Igor Mammedov wrote:
>
> >
> > + if (ram_size) {
> > + object_property_set_int(OBJECT(current_machine), ram_size,
> > + MACHINE_MEMORY_SIZE_OPT, &local_err);
> > + if (local_err) {
> > + error_report("%s", error_get_pretty(local_err));
> > + error_free(local_err);
> > + exit(EXIT_FAILURE);
> > + }
> > + }
>
> You can use &error_abort (global variable) instead of &local_err and let
> error_set handle the rest. Like this:
>
> if (ram_size) {
> object_property_set_int(OBJECT(current_machine), ram_size,
> MACHINE_MEMORY_SIZE_OPT, &error_abort);
> }
>
thanks, I'll use error_abort.
next prev parent reply other threads:[~2014-06-25 14:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 11:42 [Qemu-devel] [PATCH 0/4] tests for -m option Igor Mammedov
2014-06-25 11:42 ` [Qemu-devel] [PATCH 1/4] switch RAM_ADDR_FMT format specifier to print decimal Igor Mammedov
2014-06-25 11:51 ` Michael S. Tsirkin
2014-06-25 12:14 ` Igor Mammedov
2014-06-25 15:38 ` Michael S. Tsirkin
2014-06-25 17:47 ` Peter Maydell
2014-06-25 11:42 ` [Qemu-devel] [PATCH 2/4] vl.c: use single local_err throughout main() Igor Mammedov
2014-06-25 11:51 ` Michael S. Tsirkin
2014-06-25 12:16 ` Igor Mammedov
2014-06-25 15:42 ` Michael S. Tsirkin
2014-06-25 11:42 ` [Qemu-devel] [PATCH 3/4] machine: convert ram_size, maxram_size, ram_slots to properties Igor Mammedov
2014-06-25 11:54 ` Michael S. Tsirkin
2014-06-25 13:08 ` Igor Mammedov
2014-06-25 15:37 ` Michael S. Tsirkin
2014-06-25 14:09 ` Kirill Batuzov
2014-06-25 14:45 ` Igor Mammedov [this message]
2014-06-25 11:42 ` [Qemu-devel] [PATCH 4/4] test -m option parameters Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140625164515.2e435fc0@nial.usersys.redhat.com \
--to=imammedo@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=batuzovk@ispras.ru \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).