[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V5 12/25] cpr: QMP interfaces for restart
From: |
Steven Sistare |
Subject: |
Re: [PATCH V5 12/25] cpr: QMP interfaces for restart |
Date: |
Wed, 4 Aug 2021 16:22:44 -0400 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 |
On 8/4/2021 12:00 PM, Eric Blake wrote:
> On Wed, Jul 07, 2021 at 10:20:21AM -0700, Steve Sistare wrote:
>> cprexec calls cprexec(). Syntax:
>> { 'command': 'cprexec', 'data': { 'argv': [ 'str' ] } }
>>
>> Add the restart mode:
>> { 'enum': 'CprMode', 'data': [ 'reboot', 'restart' ] }
>>
>> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
>> ---
>> monitor/qmp-cmds.c | 5 +++++
>> qapi/cpr.json | 16 +++++++++++++++-
>> 2 files changed, 20 insertions(+), 1 deletion(-)
>>
>> diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
>> index 1128604..7326f7d 100644
>> --- a/monitor/qmp-cmds.c
>> +++ b/monitor/qmp-cmds.c
>> @@ -179,6 +179,11 @@ void qmp_cprsave(const char *file, CprMode mode, Error
>> **errp)
>> cprsave(file, mode, errp);
>> }
>>
>> +void qmp_cprexec(strList *args, Error **errp)
>> +{
>> + cprexec(args, errp);
>> +}
>
> Why do you need both qmp_cprexec() and cprexec()? Can you just name
> it qmp_cprexec() in cpr.c from the get-go, rather than having to add a
> one-line wrapper in qmp-cmds.c?
Will do.
While I'm at it, I will add an underscore to the function names and a dash to
the command
names to be consistent with other compound-word commands:
qmp_cpr_save
qmp_cpr_exec
qmp_cpr_load
cpr-save
cpr-exec
cpr-load
- Steve