From b7d28d25fd1344d4a260d5e9a250fa9bdb519ac6 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 18 Jul 2012 15:10:20 +0100 Subject: configure: Fix build with capabilities Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warning. This patch fixes support for capabilities. Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Signed-off-by: Aneesh Kumar K.V --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c65b5f6a55..309aeac815 100755 --- a/configure +++ b/configure @@ -2084,7 +2084,7 @@ if test "$cap" != "no" ; then cat > $TMPC < #include -int main(void) { cap_t caps; caps = cap_init(); } +int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; } EOF if compile_prog "" "-lcap" ; then cap=yes -- cgit v1.2.3 From 4cdc0789ec17ce1ce48506cae62035310e932a2e Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Tue, 31 Jul 2012 12:53:18 +0530 Subject: hw/9pfs: Fix assert when disabling migration For 9p we can get the attach request multiple times for the same export. So don't adding migration blocker for every attach request. Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index f4a7026381..4b52540116 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -983,11 +983,16 @@ static void v9fs_attach(void *opaque) err += offset; trace_v9fs_attach_return(pdu->tag, pdu->id, qid.type, qid.version, qid.path); - s->root_fid = fid; - /* disable migration */ - error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION, - s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag); - migrate_add_blocker(s->migration_blocker); + /* + * disable migration if we haven't done already. + * attach could get called multiple times for the same export. + */ + if (!s->migration_blocker) { + s->root_fid = fid; + error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION, + s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag); + migrate_add_blocker(s->migration_blocker); + } out: put_fid(pdu, fidp); out_nofid: -- cgit v1.2.3