On 08/05/13 21:46, John Ferlan wrote:
On 05/06/2013 08:45 AM, Osier Yang wrote:
The helper works for default sysfs_prefix, but for user specified
prefix, it doesn't work. (Detected when writing test cases. A later
patch will add the test cases for fc_host).
---
src/util/virutil.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Seems right, although it does make me wonder why the choice was made
initially to use NULL instead... That is could some other assumption
now be invalidated?
NULL means uses the default, (SYSFS_FC_HOST_PATH), the purpose
for introducing the argument "sysfs_prefix" was to allow the test
specify a different prefix actually.
Furthermore, are the calls from detect_scsi_host_caps() still valid with
a NULL?
Yeah, valid, it uses the default.
If NULL ends up being an invalid value completely, then you
should also make the change to add the ATTRIBUTE_NONNULL(1) to the
definition.
Should you "separate" the virIsCapableVport and virReadFCHost changes?
I don't think so, because it's same kind of change on both of them. :-)
Osier
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list