On Wed, 4 Nov 2015 20:19:33 +0300 "Denis V. Lunev" <d...@openvz.org> wrote:
> this will make code better in the next patch > This changelog is not very useful. IMHO this calls for squashing this patch into the next one: then we clearly see how the return value is used and why the code is better. > Signed-off-by: Denis V. Lunev <d...@openvz.org> > CC: Juan Quintela <quint...@redhat.com> > CC: Stefan Hajnoczi <stefa...@redhat.com> > CC: Kevin Wolf <kw...@redhat.com> > --- > block/snapshot.c | 7 ++++--- > include/block/snapshot.h | 6 +++--- > 2 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/block/snapshot.c b/block/snapshot.c > index 2ef4545..d729c76 100644 > --- a/block/snapshot.c > +++ b/block/snapshot.c > @@ -253,9 +253,9 @@ int bdrv_snapshot_delete(BlockDriverState *bs, > return -ENOTSUP; > } > > -void bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs, > - const char *id_or_name, > - Error **errp) > +int bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs, > + const char *id_or_name, > + Error **errp) > { > int ret; > Error *local_err = NULL; > @@ -270,6 +270,7 @@ void bdrv_snapshot_delete_by_id_or_name(BlockDriverState > *bs, > if (ret < 0) { > error_propagate(errp, local_err); > } > + return ret; > } > > int bdrv_snapshot_list(BlockDriverState *bs, > diff --git a/include/block/snapshot.h b/include/block/snapshot.h > index 0a3cf0d..76cf6a3 100644 > --- a/include/block/snapshot.h > +++ b/include/block/snapshot.h > @@ -63,9 +63,9 @@ int bdrv_snapshot_delete(BlockDriverState *bs, > const char *snapshot_id, > const char *name, > Error **errp); > -void bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs, > - const char *id_or_name, > - Error **errp); > +int bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs, > + const char *id_or_name, > + Error **errp); > int bdrv_snapshot_list(BlockDriverState *bs, > QEMUSnapshotInfo **psn_info); > int bdrv_snapshot_load_tmp(BlockDriverState *bs,