Re: [Qemu-devel] [PATCH 06/11] snapshot: distinguish id and name in snapshot delete

2013-06-12 Thread Wenchao Xia
于 2013-6-11 17:25, Stefan Hajnoczi 写道: On Sat, Jun 08, 2013 at 02:58:02PM +0800, Wenchao Xia wrote: static int find_snapshot_by_id_or_name(BlockDriverState *bs, const char *name) I suggest renaming the argument to make it less confusing: const char *name_or_id will rename it. { -

Re: [Qemu-devel] [PATCH 06/11] snapshot: distinguish id and name in snapshot delete

2013-06-11 Thread Stefan Hajnoczi
On Sat, Jun 08, 2013 at 02:58:02PM +0800, Wenchao Xia wrote: > static int find_snapshot_by_id_or_name(BlockDriverState *bs, const char > *name) I suggest renaming the argument to make it less confusing: const char *name_or_id > { > -BDRVQcowState *s = bs->opaque; > -int i, ret; > +

Re: [Qemu-devel] [PATCH 06/11] snapshot: distinguish id and name in snapshot delete

2013-06-08 Thread Fam Zheng
On Sat, 06/08 14:58, Wenchao Xia wrote: > > -static int find_snapshot_by_id(BlockDriverState *bs, const char *id_str) > +static int find_snapshot_by_id_and_name(BlockDriverState *bs, > +const char *id, > +const char *

[Qemu-devel] [PATCH 06/11] snapshot: distinguish id and name in snapshot delete

2013-06-08 Thread Wenchao Xia
Snapshot creation actually already distinguish id and name since it take a structured parameter *sn, but delete can't. Later an accurate delete is needed in qmp_transaction abort and blockdev-snapshot-delete-sync, so change its prototype. Also *errp is added to tip error, but return value is kepted