qemu-devel
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]