On 09/25/2013 06:16 PM, Wenchao Xia wrote: > Now it is possible to directly export an internal snapshot, which > can be used to probe the snapshot's contents without qemu-img > convert. > > Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com> > --- > block/snapshot.c | 18 ++++++++++++++++++ > include/block/snapshot.h | 6 ++++++ > qemu-nbd.c | 35 ++++++++++++++++++++++++++++++++++- > 3 files changed, 58 insertions(+), 1 deletions(-)
Woo-hoo! Long desired. It would be even cooler if we could set up the export directly from a running qemu instance, rather than having to spawn an external qemu-nbd process (after all, we've already documented that having more than one process directly using the same qcow2 file is not safe), but this is a step in the right direction. > @@ -328,6 +331,8 @@ int main(int argc, char **argv) > { "connect", 1, NULL, 'c' }, > { "disconnect", 0, NULL, 'd' }, > { "snapshot", 0, NULL, 's' }, > + { "load-snapshot", 1, NULL, 'l' }, > + { "load-snapshot1", 1, NULL, 'L' }, Uggh. This makes getopt_long's unambiguous-prefix handling very hard to use. For example, --dis is recognized as short for --disconnect; but here --load is NOT short for --load-snapshot, because it could also be short for --load-snapshot1. And why the 1 suffix? Can you come up with a better name that distinguishes why you have to have two different long options, and which doesn't overlap on as much of a common prefix? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature