Re: [PATCH] Add bus attribute to disk target definition

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:

> On Tue, Apr 29, 2008 at 04:10:40PM +0200, Soren Hansen wrote:
>> On Tue, Apr 29, 2008 at 02:27:00PM +0100, Daniel P. Berrange wrote:
>> >> +    if (!bus)
>> >> +        disk->bus = QEMUD_DISK_BUS_IDE;
>> >> +    else if (!strcmp((const char *)bus, "ide"))
>> >> +        disk->bus = QEMUD_DISK_BUS_IDE;
>> >> +    else if (!strcmp((const char *)bus, "scsi"))
>> >> +        disk->bus = QEMUD_DISK_BUS_SCSI;
>> >> +    else if (!strcmp((const char *)bus, "virtio"))
>> >> +        disk->bus = QEMUD_DISK_BUS_VIRTIO;
>> > Can you use the   STREQ   macro here instead of strcmp.
>>
>> Erm... I *could*.. I'm curious, though, why e.g. the similar code right
>> above it doesn't use STREQ if that's the preferred way to do it?
>
> We've been slowly updating code to match these new standards when doing
> patches.

FYI, there's already a test for this, but it's currently disabled.
If someone wants to turn it on (remove the sc_prohibit_strcmp
line from Makefile.cfg) and fix all the new violations exposed
by running "make syntax-check", it sounds like it would be welcome, now.

>> > You can run 'make syntax-check' for check for such issues.
>>
>> Yes, in theory :)  In the real world, however, "make syntax-check" fails
>> horribly here. I'll be fixing that up next.
>
> If you send details to the list,  Jim will no doubt be able to point you
> in the right direction on this...

Yep.  Though most of it is intended to be self explanatory.
If not, please let me know and I'll fix the rules in Makefile.maint.

--
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]