diff options
author | Juan Quintela <quintela@redhat.com> | 2009-12-02 11:49:34 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 09:41:25 -0600 |
commit | 57e6c977cf0bdfbdf3a09f8a3a143426527bb883 (patch) | |
tree | 4d3d9f70c8105f711fc955fdda5ec957557f8ffe | |
parent | 5bef4c24569cdbf5f5c62a48e87fe9ee2cfd26e1 (diff) | |
download | qemu-57e6c977cf0bdfbdf3a09f8a3a143426527bb883.tar.gz qemu-57e6c977cf0bdfbdf3a09f8a3a143426527bb883.tar.bz2 qemu-57e6c977cf0bdfbdf3a09f8a3a143426527bb883.zip |
audio: port to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | audio/audio.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/audio/audio.c b/audio/audio.c index 80a717bd21..a5305c492b 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1784,23 +1784,15 @@ static void audio_atexit (void) } } -static void audio_save (QEMUFile *f, void *opaque) -{ - (void) f; - (void) opaque; -} - -static int audio_load (QEMUFile *f, void *opaque, int version_id) -{ - (void) f; - (void) opaque; - - if (version_id != 1) { - return -EINVAL; +static const VMStateDescription vmstate_audio = { + .name = "audio", + .version_id = 1, + .minimum_version_id = 1, + .minimum_version_id_old = 1, + .fields = (VMStateField []) { + VMSTATE_END_OF_LIST() } - - return 0; -} +}; static void audio_init (void) { @@ -1900,7 +1892,7 @@ static void audio_init (void) } QLIST_INIT (&s->card_head); - register_savevm ("audio", 0, 1, audio_save, audio_load, s); + vmstate_register (0, &vmstate_audio, s); } void AUD_register_card (const char *name, QEMUSoundCard *card) |