qemu-img: add --shrink flag for resize

The flag is additional precaution against data loss. Perhaps in the future the
operation shrink without this flag will be blocked for all formats, but for now
we need to maintain compatibility with raw.

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20170918124230.8152-2-pbutsykin@virtuozzo.com
[mreitz: Added a missing space to a warning]
Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Pavel Butsykin
2017-09-18 15:42:27 +03:00
committed by Max Reitz
parent 69ff158b67
commit 4ffca8904a
5 changed files with 33 additions and 6 deletions

View File

@@ -89,9 +89,9 @@ STEXI
ETEXI
DEF("resize", img_resize,
"resize [--object objectdef] [--image-opts] [-q] filename [+ | -]size")
"resize [--object objectdef] [--image-opts] [-q] [--shrink] filename [+ | -]size")
STEXI
@item resize [--object @var{objectdef}] [--image-opts] [-q] @var{filename} [+ | -]@var{size}
@item resize [--object @var{objectdef}] [--image-opts] [-q] [--shrink] @var{filename} [+ | -]@var{size}
ETEXI
STEXI