[Libvir] Patch: driver->open functions return declined or error status

Richard W.M. Jones rjones at redhat.com
Thu Mar 1 13:57:49 UTC 2007


Mark McLoughlin wrote:
> On Wed, 2007-02-28 at 16:18 +0000, Richard W.M. Jones wrote:
>> +             case VIR_DRV_OPEN_ERROR: goto failed;
>> +             case VIR_DRV_OPEN_DECLINED:
>> +               /*
>> +                * For a default connect to Xen make sure we manage to contact
>> +                * all related drivers.
>> +                */
>> +               if (for_xen &&
>> +                   strncasecmp(virDriverTab[i]->name, "xen", 3) == 0 &&
>> +                   virDriverTab[i]->no != VIR_DRV_XEN_PROXY)
>> +                 goto failed;
>> +               break; 
> 
> 	Are there no current cases where we should return VIR_DRV_OPEN_ERROR?
> 
> 	Also, can we change the existing open methods to use DECLINED? I was
> confused for a minute because I presumed ERROR was -1 ...

Oh definitely.  I didn't claim that I'd fixed all the other drivers :-)

Rich.




More information about the libvir-list mailing list