[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/4] machine: convert ram_size, maxram_size, ram
From: |
Igor Mammedov |
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 |
On Wed, 25 Jun 2014 18:09:52 +0400 (MSK)
Kirill Batuzov <address@hidden> 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.
- [Qemu-devel] [PATCH 1/4] switch RAM_ADDR_FMT format specifier to print decimal, (continued)
- [Qemu-devel] [PATCH 3/4] machine: convert ram_size, maxram_size, ram_slots to properties, Igor Mammedov, 2014/06/25
- Re: [Qemu-devel] [PATCH 3/4] machine: convert ram_size, maxram_size, ram_slots to properties, Kirill Batuzov, 2014/06/25
- Re: [Qemu-devel] [PATCH 3/4] machine: convert ram_size, maxram_size, ram_slots to properties,
Igor Mammedov <=
[Qemu-devel] [PATCH 4/4] test -m option parameters, Igor Mammedov, 2014/06/25