qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint,


From: Zhang Chen
Subject: Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status
Date: Thu, 23 Feb 2017 14:06:12 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1



On 02/22/2017 11:23 PM, Eric Blake wrote:
On 02/22/2017 01:54 AM, Zhang Chen wrote:

if (err) {
    result->status = REPLICATION_STATUS_ERROR;
    result->has_desc = true;
    result->desc = ...extract string from err
} else {
    result->status = REPLICATION_STATUS_NORMAL;
}

by modifying the JSON [1]
I got your point, but I don't understand this:

result->desc = ...extract string from err

Where we can get the string from err?
Can you give me a example?
See qmp_query_migrate (migration/migration.c) for similar code that
populates an optional description member when an error is present:

     case MIGRATION_STATUS_FAILED:
         info->has_status = true;
         if (s->error) {
             info->has_error_desc = true;
             info->error_desc = g_strdup(error_get_pretty(s->error));
         }
         break;

I will fix it in next version.

Thanks
Zhang Chen



--
Thanks
Zhang Chen






reply via email to

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