savevm: Generate a name when run without one
authorMiguel Di Ciurcio Filho <miguel.filho@gmail.com>
Wed, 4 Aug 2010 17:55:49 +0000 (14:55 -0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 30 Aug 2010 16:29:23 +0000 (18:29 +0200)
commit0c8323aa0d90503ab1caed457bacde028a33ac62
tree7493796c29b075b574f0fb9d82122eed73c5411f
parentc4de4224ac07e8b5fe6b48626ddec52990fa6d5d
savevm: Generate a name when run without one

When savevm is run without a name, the name stays blank and the snapshot is
saved anyway.

The new behavior is when savevm is run without parameters a name will be
created automaticaly, so the snapshot is accessible to the user without needing
the id when loadvm is run.

(qemu) savevm
(qemu) info snapshots
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         vm-20100728134640      978K 2010-07-28 13:46:40   00:00:08.603

We use a name with the format 'vm-YYYYMMDDHHMMSS'.

This is a first step to hide the internal id, because I don't see a reason to
expose this kind of internals to the user.

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
savevm.c