Re: [RFC PATCT 2/2] TODO virNodeDeviceUpdateCaps: checks missing?

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

 



On Thu, Mar 28, 2024 at 04:00 PM +0100, Ján Tomko <jtomko@xxxxxxxxxx> wrote:
> On a Wednesday in 2024, Marc Hartmayer wrote:
>>I'm not familiar with the code so I cannot decide if ignoring the return values
>>is a bug or not. At least, it looks awkward and should be annotated.
>>
>
> Adding error reporting after years of real-world usage can be tricky (as
> evidenced by the VPD error reporting reverts by Peter).

Ohh yes, we should understand the code first.

>
> I think virNodeDeviceGetSCSITargetCaps erroring out if (!virFCIsCapableRport(rport))
> is incorrect - there were non-FC SCSI targets long before the FC code
> was added.

Ok, but then we should fix the virNodeDeviceGetSCSITargetCaps and add
the proposed check, otherwise the code looks just odd.

IMO, a better name for

virNodeDeviceGetSCSITargetCaps

and for the other functions

s/Get/Update/g

e.g.

virNodeDeviceUpdateSCSITargetCaps

…and check all other functions, e.g. virNetDevGetLinkInfo, and all?
other functions called by `virNodeDeviceUpdateCaps` have no clear out
functionality.

>
> Jano
>
>>Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxx>
>>---
>> src/conf/node_device_conf.c | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
-- 
Kind regards / Beste Grüße
   Marc Hartmayer

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




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

  Powered by Linux