diff options
author | Hanna Reitz <hreitz@redhat.com> | 2022-01-31 14:59:08 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2022-02-01 13:49:15 +0100 |
commit | 111fbd74f67575c158d9be5363825aab8be50a0a (patch) | |
tree | aa08aa9ee7798a09c20d3a823de835db7d01f25d /docs/tools/qemu-img.rst | |
parent | cb90ec3a3646a3bdb0b2a157db226db25d470442 (diff) | |
download | qemu-111fbd74f67575c158d9be5363825aab8be50a0a.zip qemu-111fbd74f67575c158d9be5363825aab8be50a0a.tar.gz qemu-111fbd74f67575c158d9be5363825aab8be50a0a.tar.bz2 |
qemu-img: Unify [-b [-F]] documentation
qemu-img convert documents the backing file and backing format options
as follows:
[-B backing_file [-F backing_fmt]]
whereas qemu-img create has this:
[-b backing_file] [-F backing_fmt]
That is, for convert, we document that -F cannot be given without -B,
while for create, way say that they are independent.
Indeed, it is technically possible to give -F without -b, because it is
left to the block driver to decide whether this is an error or not, so
sometimes it is:
$ qemu-img create -f qed -F qed test.qed 64M
Formatting 'test.qed', fmt=qed size=67108864 backing_fmt=qed [...]
And sometimes it is not:
$ qemu-img create -f qcow2 -F qcow2 test.qcow2 64M
Formatting 'test.qcow2', fmt=qcow2 cluster_size=65536 [...]
qemu-img: test.qcow2: Backing format cannot be used without backing file
Generally, it does not make much sense, though, and users should only
give -F with -b, so document it that way, as we have already done for
qemu-img convert (commit 1899bf47375ad40555dcdff12ba49b4b8b82df38).
Reported-by: Tingting Mao <timao@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220131135908.32393-1-hreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'docs/tools/qemu-img.rst')
-rw-r--r-- | docs/tools/qemu-img.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst index d663dd9..8885ea1 100644 --- a/docs/tools/qemu-img.rst +++ b/docs/tools/qemu-img.rst @@ -463,7 +463,7 @@ Command description: ``--skip-broken-bitmaps`` is also specified to copy only the consistent bitmaps. -.. option:: create [--object OBJECTDEF] [-q] [-f FMT] [-b BACKING_FILE] [-F BACKING_FMT] [-u] [-o OPTIONS] FILENAME [SIZE] +.. option:: create [--object OBJECTDEF] [-q] [-f FMT] [-b BACKING_FILE [-F BACKING_FMT]] [-u] [-o OPTIONS] FILENAME [SIZE] Create the new disk image *FILENAME* of size *SIZE* and format *FMT*. Depending on the file format, you can add one or more *OPTIONS* |