δΊ 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.
{
-
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;
> +
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 *
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