lkml.org 
[lkml]   [2014]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 3/5] xen: Put EFI machinery in place
On 20/05/14 12:29, Daniel Kiper wrote:
>
>>> + if (!xen_initial_domain() || HYPERVISOR_dom0_op(&op))
>>> + return NULL;
>>
>> if (!xen_initial_domain())
>> return NULL;
>>
>> if (HYPERVISOR_dom0_op(&op) < 0)
>> return NULL;
>
> What is wrong with my if?

Style. The function returns -ve on error not a boolean success/fail.

>>> +
>>> + /* Here we know that Xen runs on EFI platform. */
>>> +
>>> + efi = efi_xen;
>>> +
>>> + op.cmd = XENPF_firmware_info;
>>> + op.u.firmware_info.type = XEN_FW_EFI_INFO;
>>> + op.u.firmware_info.index = XEN_FW_EFI_VENDOR;
>>> + info->vendor.bufsz = sizeof(vendor);
>>> + set_xen_guest_handle(info->vendor.name, vendor);
>>> +
>>> + if (!HYPERVISOR_dom0_op(&op)) {
>>
>> if (HYPERVISOR_dom0_op(&op) == 0)
>
> Ditto?

Again, style.

David


\
 
 \ /
  Last update: 2014-05-20 15:41    [W:0.044 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site