[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/16] qemu-img convert: Deprecate using -n and -o to
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 15/16] qemu-img convert: Deprecate using -n and -o together |
Date: |
Fri, 16 Aug 2019 11:34:38 +0200 |
bdrv_create options specified with -o have no effect when skipping image
creation with -n, so this doesn't make sense. Warn against the misuse
and deprecate the combination so we can make it a hard error later.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
qemu-img.c | 5 +++++
qemu-deprecated.texi | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/qemu-img.c b/qemu-img.c
index 79983772de..d9321f6418 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2231,6 +2231,11 @@ static int img_convert(int argc, char **argv)
goto fail_getopt;
}
+ if (skip_create && options) {
+ warn_report("-o has no effect when skipping image creation");
+ warn_report("This will become an error in future QEMU versions.");
+ }
+
s.src_num = argc - optind - 1;
out_filename = s.src_num >= 1 ? argv[argc - 1] : NULL;
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index fff07bb2a3..f7680c08e1 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -305,6 +305,13 @@ to just export the entire image and then mount only
/dev/nbd0p1 than
it is to reinvoke @command{qemu-nbd -c /dev/nbd0} limited to just a
subset of the image.
+@subsection qemu-img convert -n -o (since 4.2.0)
+
+All options specified in @option{-o} are image creation options, so
+they have no effect when used with @option{-n} to skip image creation.
+Silently ignored options can be confusing, so this combination of
+options will be made an error in future versions.
+
@section Build system
@subsection Python 2 support (since 4.1.0)
--
2.20.1
- [Qemu-devel] [PULL 03/16] iotests/118: Add -blockdev based tests, (continued)
- [Qemu-devel] [PULL 03/16] iotests/118: Add -blockdev based tests, Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 06/16] block: Simplify bdrv_filter_default_perms(), Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 08/16] block: Reduce (un)drains when replacing a child, Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 07/16] block: Keep subtree drained in drop_intermediate, Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 05/16] iotests: Test migration with all kinds of filter nodes, Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 09/16] tests: Test polling in bdrv_drop_intermediate(), Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 10/16] tests: Test mid-drain bdrv_replace_child_noperm(), Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 12/16] block: Remove blk_pread_unthrottled(), Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 11/16] iotests: Add test for concurrent stream/commit, Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 13/16] mirror: Keep mirror_top_bs drained after dropping permissions, Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 15/16] qemu-img convert: Deprecate using -n and -o together,
Kevin Wolf <=
- [Qemu-devel] [PULL 14/16] block-backend: Queue requests while drained, Kevin Wolf, 2019/08/16
- [Qemu-devel] [PULL 16/16] file-posix: Handle undetectable alignment, Kevin Wolf, 2019/08/16
- Re: [Qemu-devel] [PULL 00/16] Block layer patches, no-reply, 2019/08/16
- Re: [Qemu-devel] [PULL 00/16] Block layer patches, Peter Maydell, 2019/08/16