qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bitti <bitaround@gmail.com>
To: qemu-devel@nongnu.org
Cc: dustin.kirkland@gmail.com
Subject: [Qemu-devel] [PATCH] qemu-img: Fix error "Unknown option 'size'" when using host_device format
Date: Tue, 2 Mar 2010 20:52:22 +0200	[thread overview]
Message-ID: <85f01a8b1003021052l5211388at956f6dd49e739162@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]

qemu-kvm-0.11.0

When I run:
sudo qemu-img convert ubuntu-kvm/disk0.qcow2 -O host_device /dev/vg01/vm_test

I get this:
Unknown option 'size'

Ubuntu Bug:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/460542

Signed-off-by: Bitti <bitaround@gmail.com>
---
--- block/raw-posix.c.orig	2009-09-23 10:30:02.000000000 +0300
+++ block/raw-posix.c	2009-10-25 18:22:08.780047000 +0200
@@ -1172,6 +1172,15 @@
     return ret;
 }

+static QEMUOptionParameter host_device_create_options[] = {
+    {
+        .name = BLOCK_OPT_SIZE,
+        .type = OPT_SIZE,
+        .help = "Virtual disk size"
+    },
+    { NULL }
+};
+
 static BlockDriver bdrv_host_device = {
     .format_name	= "host_device",
     .instance_size	= sizeof(BDRVRawState),
@@ -1197,6 +1206,7 @@
     .bdrv_aio_ioctl     = hdev_aio_ioctl,
 #endif
 #endif
+    .create_options = host_device_create_options,
 };

 #ifdef __linux__

[-- Attachment #2: raw-posix.c.diff --]
[-- Type: text/x-patch, Size: 635 bytes --]

--- block/raw-posix.c.orig	2009-09-23 10:30:02.000000000 +0300
+++ block/raw-posix.c	2009-10-25 18:22:08.780047000 +0200
@@ -1172,6 +1172,15 @@
     return ret;
 }
 
+static QEMUOptionParameter host_device_create_options[] = {
+    {
+        .name = BLOCK_OPT_SIZE,
+        .type = OPT_SIZE,
+        .help = "Virtual disk size"
+    },
+    { NULL }
+};
+
 static BlockDriver bdrv_host_device = {
     .format_name	= "host_device",
     .instance_size	= sizeof(BDRVRawState),
@@ -1197,6 +1206,7 @@
     .bdrv_aio_ioctl     = hdev_aio_ioctl,
 #endif
 #endif
+    .create_options = host_device_create_options,
 };
 
 #ifdef __linux__

             reply	other threads:[~2010-03-02 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 18:52 Bitti [this message]
2010-03-03  9:58 ` [Qemu-devel] [PATCH] qemu-img: Fix error "Unknown option 'size'" when using host_device format Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85f01a8b1003021052l5211388at956f6dd49e739162@mail.gmail.com \
    --to=bitaround@gmail.com \
    --cc=dustin.kirkland@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).