]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: disk: Fix parthelper '-g' option handling.
authorCole Robinson <crobinso@redhat.com>
Fri, 10 Jul 2009 01:50:20 +0000 (21:50 -0400)
committerCole Robinson <crobinso@redhat.com>
Thu, 16 Jul 2009 16:52:51 +0000 (12:52 -0400)
Typo was breaking 'parthelper -g', preventing disk pool definition.

src/parthelper.c

index f456cccb891102e5863693e92c20ce8fe9ce6784..5df46e8d23b129b86d97686622ec3245ffc1b734 100644 (file)
@@ -36,7 +36,7 @@
 #include <stdio.h>
 
 /* we don't need to include the full internal.h just for this */
-#define STRNEQ(a,b) (strcmp((a),(b)) != 0)
+#define STREQ(a,b) (strcmp((a),(b)) == 0)
 
 /* Make the comparisons below fail if your parted headers
    are so old that they lack the definition.  */
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
     PedPartition *part;
     int cmd = DISK_LAYOUT;
 
-    if (argc ==  3 && STRNEQ(argv[2], "-g")) {
+    if (argc == 3 && STREQ(argv[2], "-g")) {
         cmd = DISK_GEOMETRY;
     } else if (argc != 2) {
         fprintf(stderr, "syntax: %s DEVICE [-g]\n", argv[0]);