All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirill Batuzov <batuzovk@ispras.ru>
To: Igor Mammedov <imammedo@redhat.com>
Cc: stefano.stabellini@eu.citrix.com, mst@redhat.com, agraf@suse.de,
	qemu-devel@nongnu.org, pbonzini@redhat.com, marcel.a@redhat.com,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 3/4] machine: convert ram_size, maxram_size, ram_slots to properties
Date: Wed, 25 Jun 2014 18:09:52 +0400 (MSK)	[thread overview]
Message-ID: <alpine.DEB.2.02.1406251747550.4254@bulbul.intra.ispras.ru> (raw)
In-Reply-To: <1403696543-2458-4-git-send-email-imammedo@redhat.com>

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);
   }

-- 
Kirill

  parent reply	other threads:[~2014-06-25 14:10 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 [this message]
2014-06-25 14:45     ` Igor Mammedov
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=alpine.DEB.2.02.1406251747550.4254@bulbul.intra.ispras.ru \
    --to=batuzovk@ispras.ru \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=imammedo@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.