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

Re: [libvirt] [PATCHv2 03/12] pci: make virPCIParseDeviceAddress public



On 06/25/2013 06:30 AM, Daniel P. Berrange wrote:
> On Mon, Jun 24, 2013 at 11:05:29PM -0400, Laine Stump wrote:
>> This function has utility outside of virpci.c, so make it public.
>> ---
>>  src/libvirt_private.syms | 1 +
>>  src/util/virpci.c        | 2 +-
>>  src/util/virpci.h        | 2 ++
>>  3 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
>> index 410e932..643f311 100644
>> --- a/src/libvirt_private.syms
>> +++ b/src/libvirt_private.syms
>> @@ -1728,6 +1728,7 @@ virPCIGetVirtualFunctionIndex;
>>  virPCIGetVirtualFunctionInfo;
>>  virPCIGetVirtualFunctions;
>>  virPCIIsVirtualFunction;
>> +virPCIParseDeviceAddress;
>>  
>>  
>>  # util/virpidfile.h
>> diff --git a/src/util/virpci.c b/src/util/virpci.c
>> index 51fad78..fc04cac 100644
>> --- a/src/util/virpci.c
>> +++ b/src/util/virpci.c
>> @@ -2046,7 +2046,7 @@ logStrToLong_ui(char const *s,
>>      return ret;
>>  }
>>  
>> -static int
>> +int
>>  virPCIParseDeviceAddress(char *address,
>>                           virPCIDeviceAddressPtr bdf)
> Given that the struct is  'virPCIDeviceAddressPtr' the method
> name is really better as virPCIDeviceAddressParse'

Yeah, I noticed that way after the fact (it was an existing function
that I decided to use).


>
>>  {
>> diff --git a/src/util/virpci.h b/src/util/virpci.h
>> index 89717b8..bcf1b81 100644
>> --- a/src/util/virpci.h
>> +++ b/src/util/virpci.h
>> @@ -152,6 +152,8 @@ int virPCIGetAddrString(unsigned int domain,
>>                          char **pciConfigAddr)
>>      ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
>>  
>> +int virPCIParseDeviceAddress(char *address, virPCIDeviceAddressPtr bdf);
>> +
>>  int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
>>                                   char **pfname, int *vf_index);
> ACK with the suggested rename
>

Thanks. I'll make that change and push it.


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