Patchwork [v2] target-i386: Report on error during cpu_x86_register().

login
register
mail settings
Submitter Don Slutz
Date Sept. 3, 2012, 12:09 a.m.
Message ID <1346630960-30887-1-git-send-email-Don@CloudSwitch.com>
Download mbox | patch
Permalink /patch/181277/
State New
Headers show

Comments

Don Slutz - Sept. 3, 2012, 12:09 a.m.
Send it to stderr before free of the details.

Signed-off-by: Don Slutz <Don@CloudSwitch.com>
---
v2: Change __FUNCTION__ to __func__

 target-i386/cpu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Don Slutz - Sept. 11, 2012, 2:13 p.m.
On 09/02/12 20:09, Don Slutz wrote:
> Send it to stderr before free of the details.
>
> Signed-off-by: Don Slutz <Don@CloudSwitch.com>
> ---
> v2: Change __FUNCTION__ to __func__
>
>   target-i386/cpu.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 57c064f..760cca4 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1352,6 +1352,7 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
>       }
>       object_property_set_str(OBJECT(cpu), def->model_id, "model-id", &error);
>       if (error_is_set(&error)) {
> +        fprintf(stderr, "%s: %s\n", __func__, error_get_pretty(error));
>           error_free(error);
>           return -1;
>       }
The (3) patch set in 
http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg01400.html 
includes this change, and so this request is being withdrawn.

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 57c064f..760cca4 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1352,6 +1352,7 @@  int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
     }
     object_property_set_str(OBJECT(cpu), def->model_id, "model-id", &error);
     if (error_is_set(&error)) {
+        fprintf(stderr, "%s: %s\n", __func__, error_get_pretty(error));
         error_free(error);
         return -1;
     }