qdev: remove print/parse methods from LostTickPolicy properties

Also generalize the code so that we can have more enum properties
in the future.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-02-02 22:09:44 +01:00
parent acbac4a1dc
commit 1ce0512557
3 changed files with 34 additions and 32 deletions

View file

@ -140,6 +140,7 @@ struct PropertyInfo {
const char *legacy_name;
size_t size;
enum PropertyType type;
const char **enum_table;
int64_t min;
int64_t max;
int (*parse)(DeviceState *dev, Property *prop, const char *str);