Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 120

kvm-83-164.el5_5.30.src.rpm

From ef9570b1a68b37605518f55033004f6bbd13507f Mon Sep 17 00:00:00 2001
From: Juan Quintela <quintela@redhat.com>
Date: Wed, 22 Jul 2009 17:54:10 +0200
Subject: [PATCH] Fix hdev_open error:

In changeset 0749b030
We introduced an assignation instead of one comparation.
Bad, bad, bad reviewers (I was one of them).

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <8c94268e7c70c9ef56f89fb4eb34bb357e29da91.1248275998.git.quintela@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Bugzilla: 513252
RH-Upstream-status: not-applicable
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Acked-by: Dor Laor <dlaor@redhat.com>
---
 qemu/block-raw-posix.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/block-raw-posix.c b/qemu/block-raw-posix.c
index ac2dab9..9f49f22 100644
--- a/qemu/block-raw-posix.c
+++ b/qemu/block-raw-posix.c
@@ -957,7 +957,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
         /* open will not fail even if no floppy is inserted */
         open_flags |= O_NONBLOCK;
     }
-    if (s->type = FTYPE_FILE &&
+    if (s->type == FTYPE_FILE &&
         strstart(filename, "/dev/sg", NULL)) {
         bs->sg = 1;
     }
-- 
1.6.3.rc4.29.g8146