Re: [PATCH 1/3] virsh: add support for accepting arbitrary argv

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

 



On 10/15/2010 03:25 PM, Matthias Bolte wrote:
  typedef enum {
-    VSH_OT_NONE = 0,            /* none */
-    VSH_OT_BOOL,                /* boolean option */
-    VSH_OT_STRING,              /* string option */
-    VSH_OT_INT,                 /* int option */
-    VSH_OT_DATA                 /* string data (as non-option) */
+    VSH_OT_BOOL,     /* boolean option */

You lost (or explicitly removed) the = 0 here, but that's okay.

Explicitly dropped (C89 defaults enums to start from 0, and I tend to favor minimal code solutions). Besides, and since this enum is not exported, it doesn't matter _what_ we start with, as long as the values are distinct, so the compiler default is as good as any explicit setting.


+    VSH_OT_STRING,   /* string option */
+    VSH_OT_INT,      /* int option */
+    VSH_OT_DATA,     /* string data (as non-option) */
+    VSH_OT_ARGV      /* remaining arguments, opt->name should be "" */
  } vshCmdOptType;


ACK.

You really try to cover all edge cases here :)

Thanks - I sure tried! (although I didn't use gcov, so I probably missed some). I've pushed the series now.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]