[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 03 of 18] tools/blktap: fix params and physical-device parsing



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1333397506 -7200
# Node ID 90e2257cace2c3b7b8e7c4611614ad4da07ec895
# Parent  569fc8260490b64ae837c6ed67f1a5b2e582744c
tools/blktap: fix params and physical-device parsing

If parsing the "physical-device" property fails the physical device node
should come from the "params" property. But since the deverr value was
overwritten during read of the "mode" property, the "params" property
was never parsed.

Fix this by using different local variable for reading "mode" so that
deverr can be reused to check the "params" property.

v2:
 - use different local variable as suggested by IanJ

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 569fc8260490 -r 90e2257cace2 tools/blktap/lib/xenbus.c
--- a/tools/blktap/lib/xenbus.c
+++ b/tools/blktap/lib/xenbus.c
@@ -346,8 +346,8 @@ static void ueblktap_setup(struct xs_han
        }
 
        /* Check to see if device is to be opened read-only. */
-       deverr = xs_gather(h, bepath, "mode", NULL, &path, NULL);
-       if (deverr) {
+       er = xs_gather(h, bepath, "mode", NULL, &path, NULL);
+       if (er) {
                DPRINTF("ERROR: could not find read/write mode\n");
                goto fail;
        } else if (path[0] == 'r')

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.