|
@@ -79,6 +79,7 @@ enum {
|
|
OPTION_DISABLE = 273,
|
|
OPTION_DISABLE = 273,
|
|
OPTION_MERGE = 274,
|
|
OPTION_MERGE = 274,
|
|
OPTION_BITMAPS = 275,
|
|
OPTION_BITMAPS = 275,
|
|
|
|
+ OPTION_FORCE = 276,
|
|
};
|
|
};
|
|
|
|
|
|
typedef enum OutputFormat {
|
|
typedef enum OutputFormat {
|
|
@@ -4090,6 +4091,7 @@ static int img_amend(int argc, char **argv)
|
|
BlockBackend *blk = NULL;
|
|
BlockBackend *blk = NULL;
|
|
BlockDriverState *bs = NULL;
|
|
BlockDriverState *bs = NULL;
|
|
bool image_opts = false;
|
|
bool image_opts = false;
|
|
|
|
+ bool force = false;
|
|
|
|
|
|
cache = BDRV_DEFAULT_CACHE;
|
|
cache = BDRV_DEFAULT_CACHE;
|
|
for (;;) {
|
|
for (;;) {
|
|
@@ -4097,6 +4099,7 @@ static int img_amend(int argc, char **argv)
|
|
{"help", no_argument, 0, 'h'},
|
|
{"help", no_argument, 0, 'h'},
|
|
{"object", required_argument, 0, OPTION_OBJECT},
|
|
{"object", required_argument, 0, OPTION_OBJECT},
|
|
{"image-opts", no_argument, 0, OPTION_IMAGE_OPTS},
|
|
{"image-opts", no_argument, 0, OPTION_IMAGE_OPTS},
|
|
|
|
+ {"force", no_argument, 0, OPTION_FORCE},
|
|
{0, 0, 0, 0}
|
|
{0, 0, 0, 0}
|
|
};
|
|
};
|
|
c = getopt_long(argc, argv, ":ho:f:t:pq",
|
|
c = getopt_long(argc, argv, ":ho:f:t:pq",
|
|
@@ -4144,6 +4147,9 @@ static int img_amend(int argc, char **argv)
|
|
case OPTION_IMAGE_OPTS:
|
|
case OPTION_IMAGE_OPTS:
|
|
image_opts = true;
|
|
image_opts = true;
|
|
break;
|
|
break;
|
|
|
|
+ case OPTION_FORCE:
|
|
|
|
+ force = true;
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4221,7 +4227,7 @@ static int img_amend(int argc, char **argv)
|
|
|
|
|
|
/* In case the driver does not call amend_status_cb() */
|
|
/* In case the driver does not call amend_status_cb() */
|
|
qemu_progress_print(0.f, 0);
|
|
qemu_progress_print(0.f, 0);
|
|
- ret = bdrv_amend_options(bs, opts, &amend_status_cb, NULL, &err);
|
|
|
|
|
|
+ ret = bdrv_amend_options(bs, opts, &amend_status_cb, NULL, force, &err);
|
|
qemu_progress_print(100.f, 0);
|
|
qemu_progress_print(100.f, 0);
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
error_report_err(err);
|
|
error_report_err(err);
|