Patchwork hw/9pfs: Fix segfault on arch that doesn't support VirtFS

login
register
mail settings
Submitter Aneesh Kumar K.V
Date June 10, 2011, 1:43 p.m.
Message ID <1307713392-21961-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/99897/
State New
Headers show

Comments

Aneesh Kumar K.V - June 10, 2011, 1:43 p.m.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fsdev/qemu-fsdev-dummy.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Edgar Iglesias - June 10, 2011, 9 p.m.
On Fri, Jun 10, 2011 at 07:13:12PM +0530, Aneesh Kumar K.V wrote:
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Thanks for the quick response earlier today, I had already applied
your first patch :)

Cheers


> ---
>  fsdev/qemu-fsdev-dummy.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c
> index 619e163..4e700dd 100644
> --- a/fsdev/qemu-fsdev-dummy.c
> +++ b/fsdev/qemu-fsdev-dummy.c
> @@ -13,8 +13,16 @@
>  #include <stdio.h>
>  #include <string.h>
>  #include "qemu-fsdev.h"
> +#include "qemu-config.h"
>  
>  int qemu_fsdev_add(QemuOpts *opts)
>  {
>      return 0;
>  }
> +
> +static void fsdev_register_config(void)
> +{
> +    qemu_add_opts(&qemu_fsdev_opts);
> +    qemu_add_opts(&qemu_virtfs_opts);
> +}
> +machine_init(fsdev_register_config);
> -- 
> 1.7.4.1
> 
>

Patch

diff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c
index 619e163..4e700dd 100644
--- a/fsdev/qemu-fsdev-dummy.c
+++ b/fsdev/qemu-fsdev-dummy.c
@@ -13,8 +13,16 @@ 
 #include <stdio.h>
 #include <string.h>
 #include "qemu-fsdev.h"
+#include "qemu-config.h"
 
 int qemu_fsdev_add(QemuOpts *opts)
 {
     return 0;
 }
+
+static void fsdev_register_config(void)
+{
+    qemu_add_opts(&qemu_fsdev_opts);
+    qemu_add_opts(&qemu_virtfs_opts);
+}
+machine_init(fsdev_register_config);