Skip to contentSkip to conversation

: block: Document -drive options

PATCH Applied Luiz Capitulino 2 participants 5 messages Jul 12, 2011 – Jul 13, 2011

lore
Share & tools
lore
#0 lore raw

v2 cover : block: Document -drive options

Please, see individual patches for details.

v2

o Correct man-page text
o Document -drive options in qemu-config.c

 qemu-config.c   |    6 ++++++
 qemu-options.hx |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
#1 lore raw

PATCH v2 1/2 qemu-options.hx: Document missing -drive options

They are 'werror', 'rerror' and 'readonly'.

---
 qemu-options.hx |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
qemu-options.hx +8 -0
index e6d7adc..64114dd 100644
@@ -160,6 +160,14 @@ an untrusted format header.
 This option specifies the serial number to assign to the device.
 @item addr=@var{addr}
 Specify the controller's PCI address (if=virtio only).
+@item werror=@var{action},rerror=@var{action}
+Specify which @var{action} to take on write and read errors. Valid actions are:
+"ignore" (ignore the error and try to continue), "stop" (pause QEMU),
+"report" (report the error to the guest), "enospc" (pause QEMU only if the
+host disk is full; report the error to the guest otherwise).
+The default setting is @option{werror=enospc} and @option{rerror=report}.
+@item readonly
+Open drive @option{file} as read-only. Guest write attempts will fail.
 @end table
 
 By default, writethrough caching is used for all block device.  This means that
Signature · 1 line
1.7.6.134.gcf13f
#2 lore raw

PATCH v2 2/2 qemu-config: Document -drive options

In reply to Luiz Capitulino

From: Luiz Capitulino <[email protected]>

---
 qemu-config.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
qemu-config.c +6 -0
index c63741c..93d20c6 100644
@@ -23,6 +23,7 @@ static QemuOptsList qemu_drive_opts = {
         },{
             .name = "index",
             .type = QEMU_OPT_NUMBER,
+            .help = "index number",
         },{
             .name = "cyls",
             .type = QEMU_OPT_NUMBER,
@@ -46,6 +47,7 @@ static QemuOptsList qemu_drive_opts = {
         },{
             .name = "snapshot",
             .type = QEMU_OPT_BOOL,
+            .help = "enable/disable snapshot mode",
         },{
             .name = "file",
             .type = QEMU_OPT_STRING,
@@ -65,12 +67,15 @@ static QemuOptsList qemu_drive_opts = {
         },{
             .name = "serial",
             .type = QEMU_OPT_STRING,
+            .help = "disk serial number",
         },{
             .name = "rerror",
             .type = QEMU_OPT_STRING,
+            .help = "read error action",
         },{
             .name = "werror",
             .type = QEMU_OPT_STRING,
+            .help = "write error action",
         },{
             .name = "addr",
             .type = QEMU_OPT_STRING,
@@ -78,6 +83,7 @@ static QemuOptsList qemu_drive_opts = {
         },{
             .name = "readonly",
             .type = QEMU_OPT_BOOL,
+            .help = "open drive file as read-only",
         },
         { /* end of list */ }
     },
Signature · 1 line
1.7.6.134.gcf13f
Applied
#3 lore raw
In reply to Luiz Capitulino

Am 12.07.2011 22:35, schrieb Luiz Capitulino:

Quoted 10 lines

Please, see individual patches for details.

v2

o Correct man-page text
o Document -drive options in qemu-config.c

 qemu-config.c   |    6 ++++++
 qemu-options.hx |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

Thanks, applied both to the block branch.

Are the help texts in qemu-config.c actually used anywhere?

Kevin

#4 lore raw
Quoted 8 lines · On Wed, 13 Jul 2011 10:01:49 +0200 Kevin Wolf <[email protected]> wrote:

Am 12.07.2011 22:35, schrieb Luiz Capitulino:

Quoted 7 lines

Please, see individual patches for details.

v2

o Correct man-page text
o Document -drive options in qemu-config.c

Quoted 7 lines
Quoted 3 lines
 qemu-config.c   |    6 ++++++
 qemu-options.hx |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

Thanks, applied both to the block branch.

Are the help texts in qemu-config.c actually used anywhere?

Good question. I thought we had something like 'qemu -drive ?' but apparently we don't.