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: Kirill Batuzov
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)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

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



reply via email to

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