From: Daniel Veillard Date: Fri, 25 Jul 2008 08:42:05 +0000 (+0000) Subject: wrong open() failure detection X-Git-Tag: LIBVIRT_0_4_6~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fae611381940a85fcba71e51370fc6a4359c540;p=thirdparty%2Flibvirt.git wrong open() failure detection * src/qemu_driver.c: Guido Trotter pointed out a wrong open() failure detection Daniel --- diff --git a/ChangeLog b/ChangeLog index ed46fec135..09de626ac6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 25 10:39:54 CEST 2008 Daniel Veillard + + * src/qemu_driver.c: Guido Trotter pointed out a wrong open() failure + detection + Fri Jul 25 08:36:18 CEST 2008 Daniel Veillard * docs/libvirt.rng: patch from John Levon fixing various patterns diff --git a/src/qemu_driver.c b/src/qemu_driver.c index f706819547..9bd059a45e 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -504,7 +504,7 @@ static int qemudOpenMonitor(virConnectPtr conn, char buf[1024]; int ret = -1; - if (!(monfd = open(monitor, O_RDWR))) { + if ((monfd = open(monitor, O_RDWR)) < 0) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("Unable to open monitor path %s"), monitor); return -1;