Am 13.04.2013 um 13:11 hat Wenchao Xia geschrieben: > The code before really committing is moved into a function. Most
This line seems to be indented accidentally? > code are simply moved from qmp_transaction()i, except fail handling > label is changed from "delete_and_fail" to "fail". Other code such > as input parsing is not touched, to make it easier in review. > > Signed-off-by: Wenchao Xia <[email protected]> > --- > blockdev.c | 146 +++++++++++++++++++++++++++++++++-------------------------- > 1 files changed, 82 insertions(+), 64 deletions(-) > > diff --git a/blockdev.c b/blockdev.c > index 8a1652b..e01906c 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -785,6 +785,84 @@ typedef struct BlkTransactionStates { > QSIMPLEQ_ENTRY(BlkTransactionStates) entry; > } BlkTransactionStates; > > +static int external_snapshot_prepare(const char *device, > + const char *format, > + const char *new_image_file, > + enum NewImageMode mode, > + BlkTransactionStates *states, > + Error **errp) One error reporting mechanism is enough, so this function should return void. Kevin
