Laine Stump
Mon, 26 Oct 2009 06:27:21 -0700
On 10/26/2009 06:36 AM, David Lutterkort wrote: > On Fri, 2009-10-23 at 13:32 -0400, Laine Stump wrote: > >> Iterate the NETLINK link cache to find the entry for each interface, >> extract the mac address, and add it to the XML. >> > This doesn't apply for me, neither on top of the ncf_if_status patch, > nor on master. I get > > Applying: Report actual mac address in ncf_if_xml_state. > error: patch failed: src/dutil.c:735 > error: src/dutil.c: patch does not apply > Patch failed at 0001 Report actual mac address in > ncf_if_xml_state. >
Ah, you're right. I had done some rearranging of the code in a separate
commit just prior to this one, and forgot to include that in the patch
series. If I'm quick I can resend before I have to leave for 1/2 an hour...
>
>
>> ---
>> src/dutil.c | 67
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>> 1 files changed, 66 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/dutil.c b/src/dutil.c
>> index 1fc6097..a010d27 100644
>> --- a/src/dutil.c
>> +++ b/src/dutil.c
>> @@ -708,10 +709,60 @@ error:
>> return;
>> }
>>
>> +static void _add_mac_cb(struct nl_object *obj, void *arg) {
>>
> No need to start names with '_'. Just call it 'add_mac_cb'.
>
Okay.
>
>> + nl_addr2str(addr, mac_str, sizeof(mac_str));
>>
> Ugh .. no way to check that the buffer was big enough - I filed BZ
> 530969 for that.
>
Well, even though it may silently chop off something at the end, at
least they let you specify the size of the buffer so you know you won't
overflow. ;-)
> David
>
>
>
>
_______________________________________________
netcf-devel mailing list
netcf-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel