[libvirt] [PATCH] host-validate: Improve CPU flags processing

Peter Krempa pkrempa at redhat.com
Thu Mar 31 07:48:32 UTC 2016


On Wed, Mar 30, 2016 at 18:35:04 +0200, Andrea Bolognani wrote:
> On Wed, 2016-03-30 at 09:28 +0200, Andrea Bolognani wrote:
> > On Wed, 2016-03-30 at 08:36 +0200, Peter Krempa wrote:
> > > 
> > > Since you are already using libvirt's utils ...
> > [...]
> > > 
> > > Why not virStringSplit ...
> > [...]
> > > 
> > > And STREQ?
>> > No reason at all, really :)
> 
> On second thought, after having actually tried to implement
> your suggestions...
> 
> virStringSplit() only supports a single delimiter, while
> strtok_r() supports an arbitrary number - I'm using three in
> my case.
> 
> So AFAICS the options are
> 
>   - call virStringSplit() multiple times, hoping to take
>     all possible combinations into account

Humm, no that wouldn't make much sense.

>   - enhance virStringSplit() to support multiple delimiters

virStringSplit actually uses a string as delimiter for some reason so
that option would basically result in adding a new function.
> 
>   - keep using strtok_r()

Okay, it makes sense here :)

> 
> I'm quite partial to the last option :P
> What about you?

Let me re-visit the patch then.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160331/93e14a2c/attachment-0001.sig>


More information about the libvir-list mailing list