Am 05.03.2014 16:04, schrieb Igor Mammedov:
> On Tue, 4 Mar 2014 03:55:44 +0100
> Andreas Färber <[email protected]> wrote:
>
>> Adapt the X86CPU implementation to suit the generic hook.
>> This involves a cleanup of error handling to cope with NULL errp.
>>
>> Signed-off-by: Andreas Färber <[email protected]>
>> ---
>> include/qom/cpu.h | 3 +++
>> target-i386/cpu.c | 36 +++++++++++++++++++++---------------
>> 2 files changed, 24 insertions(+), 15 deletions(-)
>>
>> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
>> index 64ebfa5..43d253a 100644
>> --- a/include/qom/cpu.h
>> +++ b/include/qom/cpu.h
>> @@ -67,6 +67,8 @@ struct TranslationBlock;
>> * CPUClass:
>> * @class_by_name: Callback to map -cpu command line model name to an
>> * instantiatable CPU type.
>> + * @parse_features: Callback to parse command line arguments.
>> + * The argument may be modified by the callback.
> Could you specify which argument is expected to be modified?
Like so? "The arguments (%str) may be modified by the callback."
Alternatively I could drop that line, given that it's not const char *.
Or add a typedef for the callback and document it there using @str syntax.
Thanks,
Andreas
>
>> * @reset: Callback to reset the #CPUState to its initial state.
>> * @reset_dump_flags: #CPUDumpFlags to use for reset logging.
>> * @has_work: Callback for checking if there is work to do.
>> @@ -96,6 +98,7 @@ typedef struct CPUClass {
>> /*< public >*/
>>
>> ObjectClass *(*class_by_name)(const char *cpu_model);
>> + void (*parse_features)(CPUState *cpu, char *str, Error **errp);
>>
>> void (*reset)(CPUState *cpu);
>> int reset_dump_flags;
[snip]
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg