[Libvir] Option string in getopt_long wrong?

while ((arg = getopt_long(end, argv, "d:hqtv", opt, &idx)) != -1) { ------ switch (arg) { case 'd': ctl->debug = atoi(optarg); break; case 'h': help = 1; break; case 'q': ctl->quiet = TRUE; break; case 't': ctl->timing = TRUE; break; case 'c': ctl->name = vshStrdup(ctl, optarg); break; // etc Shurley shome mishtake? Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 "[Negative numbers] darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple" (Francis Maseres FRS, mathematician, 1759)

On Fri, Jan 26, 2007 at 11:38:58AM +0000, Richard W.M. Jones wrote:
while ((arg = getopt_long(end, argv, "d:hqtv", opt, &idx)) != -1) { ------ switch (arg) { case 'd': ctl->debug = atoi(optarg); break; case 'h': help = 1; break; case 'q': ctl->quiet = TRUE; break; case 't': ctl->timing = TRUE; break; case 'c': ctl->name = vshStrdup(ctl, optarg); break; // etc
Shurley shome mishtake?
Right, thanks, fixed in CVS ;-) That file need also a reformatting cleanup but I will wait for Dan's patch for console and vnc to be applied first. I use this for C indentation: paphio:~ -> cat ~/bin/cb #!/bin/sh indent -bad -bap -bbb -bli4 -br -ce -brs -cs -i4 -l75 -lc75 -nut -sbi4 -psl -saf -sai -saw -sbi4 -ss -sc -cdw -cli4 -npcs -nbc Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Fri, Jan 26, 2007 at 06:51:15AM -0500, Daniel Veillard wrote:
On Fri, Jan 26, 2007 at 11:38:58AM +0000, Richard W.M. Jones wrote:
while ((arg = getopt_long(end, argv, "d:hqtv", opt, &idx)) != -1) { ------ switch (arg) { case 'd': ctl->debug = atoi(optarg); break; case 'h': help = 1; break; case 'q': ctl->quiet = TRUE; break; case 't': ctl->timing = TRUE; break; case 'c': ctl->name = vshStrdup(ctl, optarg); break; // etc
Shurley shome mishtake?
Right, thanks, fixed in CVS ;-) That file need also a reformatting cleanup but I will wait for Dan's patch for console and vnc to be applied first. I use this for C indentation:
paphio:~ -> cat ~/bin/cb #!/bin/sh indent -bad -bap -bbb -bli4 -br -ce -brs -cs -i4 -l75 -lc75 -nut -sbi4 -psl -saf -sai -saw -sbi4 -ss -sc -cdw -cli4 -npcs -nbc
Yes, indentation in virsh.c is a bit of a mess. I've been fixing up the indentation in other files as I go along, and adding in following emacs magic at the end of the source files - it should make C-mode compatible with your ident settings above. /* * Local variables: * indent-tabs-mode: nil * c-indent-level: 4 * c-basic-offset: 4 * tab-width: 4 * End: */ I find that having the settings embedded in the tail end of all the various source file very handy because I'm working on a huge number of different dev machines which are frequently re-installed, so not all of them have the correct settings in my $HOME/.emacs file. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Daniel Veillard wrote:
On Fri, Jan 26, 2007 at 11:38:58AM +0000, Richard W.M. Jones wrote:
while ((arg = getopt_long(end, argv, "d:hqtv", opt, &idx)) != -1) { ------ switch (arg) { case 'd': ctl->debug = atoi(optarg); break; case 'h': help = 1; break; case 'q': ctl->quiet = TRUE; break; case 't': ctl->timing = TRUE; break; case 'c': ctl->name = vshStrdup(ctl, optarg); break; // etc
Shurley shome mishtake?
Right, thanks, fixed in CVS ;-)
Actually the patch you put in is slightly wrong - it needs a colon (':') after the c, ie: "d:hqtcv" -> "d:hqtc:v" Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 "[Negative numbers] darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple" (Francis Maseres FRS, mathematician, 1759)
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Richard W.M. Jones