[Libvir] [PATCH] Fix detach-disk command for tap device

2007-12-14 Thread Saori Fukuta
The detach-disk command does not work for tap device, since xenStoreDomainGetDiskID is always searching for vbd device from XenStore. c.f. This is a the related patch: http://git.et.redhat.com/?p=libvirt.git;a=commit;h=d27506d3a36e12b977f6a896bae5082134db8fb5 So, I changed the searching path to

[Libvir] [PATCH] Fix the cpus parameter setting of xenXMParseXMLToConfig

2007-12-14 Thread Saori Fukuta
I think there is a unnecessary code for setting cpus parameter at xenXMParseXMLToConfig, since the cpus parameter is already set on the upper code. Because of this, converted cpus string will not be used. So, can I remove it ? Regards, Saori Fukuta numa-fix.patch Description: Binary data --

Re: [Libvir] [PATCH] Fix the cpus parameter setting of xenXMParseXMLToConfig

2007-12-14 Thread Richard W.M. Jones
Saori Fukuta wrote: I think there is a unnecessary code for setting cpus parameter at xenXMParseXMLToConfig, since the cpus parameter is already set on the upper code. Because of this, converted cpus string will not be used. So, can I remove it ? Yes I agree, this code does seem to duplicate

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Daniel Veillard
On Fri, Dec 14, 2007 at 08:34:13AM +0100, Jim Meyering wrote: You're right that we shouldn't use isalnum here. However, we shouldn't use inequality comparisons, either. While 0 = c = 9 is guaranteed to be ok for the digits, the a..z and A..Z ranges need not be contiguous, i.e., with EBCDIC:

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Richard W.M. Jones
Jim Meyering wrote: What do you think of using this? isascii (*p) isalnum (*p) I'm not sure I'm qualified to say what this does on EBCDIC, but quite likely lots of other code breaks there too anyway. This is nicely self-documenting anyway. Rich. -- Emerging Technologies, Red Hat -

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Jim Meyering
Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: What do you think of using this? isascii (*p) isalnum (*p) I'm not sure I'm qualified to say what this does on EBCDIC, but quite likely lots of other code breaks there too anyway. This is nicely self-documenting anyway.

Re: [Libvir] [PATCH] Fix detach-disk command for tap device

2007-12-14 Thread Richard W.M. Jones
Saori Fukuta wrote: The detach-disk command does not work for tap device, since xenStoreDomainGetDiskID is always searching for vbd device from XenStore. c.f. This is a the related patch: http://git.et.redhat.com/?p=libvirt.git;a=commit;h=d27506d3a36e12b977f6a896bae5082134db8fb5 So, I changed

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Richard W.M. Jones
Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: What do you think of using this? isascii (*p) isalnum (*p) I'm not sure I'm qualified to say what this does on EBCDIC, but quite likely lots of other code breaks there too anyway. This is nicely

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Jim Meyering
Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: What do you think of using this? isascii (*p) isalnum (*p) I'm not sure I'm qualified to say what this does on EBCDIC, but quite likely lots of other code

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Richard W.M. Jones
Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: What do you think of using this? isascii (*p) isalnum (*p) I'm not sure I'm qualified to say what this does on EBCDIC, but quite likely

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Daniel Veillard
On Fri, Dec 14, 2007 at 02:17:31PM +0100, Jim Meyering wrote: I stand by my suggestion to use the switch statement. I stand by the satus quo, with an EBCDIC comment if you really care Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard |

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Daniel Veillard
On Fri, Dec 14, 2007 at 11:06:36AM +, Richard W.M. Jones wrote: OK, how about this? Rich. +for (p = str; *p; ++p) { +/* Want to escape only A-Z and 0-9. This may not work on EBCDIC. */ +if (isascii (*p) isalnum (*p)) +grow_size++; +else +

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Daniel Veillard
On Fri, Dec 14, 2007 at 08:22:24AM -0500, Daniel Veillard wrote: On Fri, Dec 14, 2007 at 11:06:36AM +, Richard W.M. Jones wrote: OK, how about this? Rich. +for (p = str; *p; ++p) { +/* Want to escape only A-Z and 0-9. This may not work on EBCDIC. */ +if

Re: [Libvir] [PATCH] 1/2 Add qparams.[ch] mini-library for parsing and assembling query strings

2007-12-14 Thread Daniel P. Berrange
Looks good to me, although you seem to have left out the part of the patch with the unit tests in ;-P Seriously though, now it is untangled from the remote driver code this ought to be a nice module to test. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Jim Meyering
Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: Jim Meyering wrote: What do you think of using this? isascii (*p) isalnum (*p) I'm not sure I'm qualified to say

Re: [Libvir] [PATCH] Fix detach-disk command for tap device

2007-12-14 Thread Daniel P. Berrange
On Fri, Dec 14, 2007 at 10:21:54AM +, Richard W.M. Jones wrote: Saori Fukuta wrote: The detach-disk command does not work for tap device, since xenStoreDomainGetDiskID is always searching for vbd device from XenStore. c.f. This is a the related patch:

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Daniel P. Berrange
On Fri, Dec 14, 2007 at 08:34:13AM +0100, Jim Meyering wrote: Daniel Veillard [EMAIL PROTECTED] wrote: On Thu, Dec 13, 2007 at 11:21:31PM +0100, Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: ... + * virBufferURIEncodeString: + * @buf: the buffer to append to +

Re: [Libvir] [PATCH] 2/2 Factor out query parsing from remote

2007-12-14 Thread Daniel P. Berrange
On Thu, Dec 13, 2007 at 06:24:07PM +, Richard W.M. Jones wrote: This pulls the query parsing code from remote_internal.c and makes it use the functions in qparams.c instead. Also I've changed DEBUG to use the global ENABLE_DEBUG symbol, and replaced calls to strcasecmp with STRCASEEQ

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Richard Jones
Jim Meyering wrote: $ LC_ALL=vi_VN.tcvn ./k 1: 2: 4: 5: 6: 17: 18: 19: 20: 21: 22: 23: Surprise, surprise... So in this locale, using isascii (*p) isalnum (*p) would *under*quote. I didn't expect to find such a convincing argument. I stand by my suggestion to use the

Re: [Libvir] [PATCH] Fix the cpus parameter setting of xenXMParseXMLToConfig

2007-12-14 Thread Daniel Veillard
On Fri, Dec 14, 2007 at 10:31:58AM -0500, Daniel Veillard wrote: On Fri, Dec 14, 2007 at 02:34:34PM +, Daniel P. Berrange wrote: On Fri, Dec 14, 2007 at 05:57:37PM +0900, Saori Fukuta wrote: I think there is a unnecessary code for setting cpus parameter at xenXMParseXMLToConfig, since

Re: [Libvir] [PATCH] Fix the cpus parameter setting of xenXMParseXMLToConfig

2007-12-14 Thread Daniel Veillard
On Fri, Dec 14, 2007 at 02:34:34PM +, Daniel P. Berrange wrote: On Fri, Dec 14, 2007 at 05:57:37PM +0900, Saori Fukuta wrote: I think there is a unnecessary code for setting cpus parameter at xenXMParseXMLToConfig, since the cpus parameter is already set on the upper code. Because of

Re: [Libvir] [PATCH] Fix detach-disk command for tap device

2007-12-14 Thread Daniel Veillard
On Fri, Dec 14, 2007 at 02:32:53PM +, Daniel P. Berrange wrote: On Fri, Dec 14, 2007 at 10:21:54AM +, Richard W.M. Jones wrote: Saori Fukuta wrote: The detach-disk command does not work for tap device, since xenStoreDomainGetDiskID is always searching for vbd device from XenStore.

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote: On Fri, Dec 14, 2007 at 08:34:13AM +0100, Jim Meyering wrote: Daniel Veillard [EMAIL PROTECTED] wrote: On Thu, Dec 13, 2007 at 11:21:31PM +0100, Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: ... + * virBufferURIEncodeString:

Re: [Libvir] [PATCH] Enhance virBuffer code

2007-12-14 Thread Daniel P. Berrange
On Fri, Dec 14, 2007 at 11:53:35PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: On Fri, Dec 14, 2007 at 08:34:13AM +0100, Jim Meyering wrote: Daniel Veillard [EMAIL PROTECTED] wrote: On Thu, Dec 13, 2007 at 11:21:31PM +0100, Jim Meyering wrote: Richard W.M.