git: c4ba4aa54718 - main - libifconfig: Overhaul ifconfig_media_* interfaces

Ryan Moeller freqlabs at FreeBSD.org
Fri Mar 5 19:40:31 UTC 2021


On 3/5/21 1:19 PM, Konstantin Belousov wrote:
> On Fri, Mar 05, 2021 at 11:23:56AM +0000, Ryan Moeller wrote:
>> The branch main has been updated by freqlabs:
>>
>> URL: https://cgit.FreeBSD.org/src/commit/?id=c4ba4aa547184ab401204096cdad9def4ab37964
>>
>> commit c4ba4aa547184ab401204096cdad9def4ab37964
>> Author:     Ryan Moeller <freqlabs at FreeBSD.org>
>> AuthorDate: 2021-03-02 10:29:17 +0000
>> Commit:     Ryan Moeller <freqlabs at FreeBSD.org>
>> CommitDate: 2021-03-05 09:15:55 +0000
>>
>>      libifconfig: Overhaul ifconfig_media_* interfaces
>>      
>>      Define an ifmedia_t type to use for ifmedia words.
>>      
>>      Add ifconfig_media_lookup_* functions to lookup ifmedia words by name.
>>      
>>      Get media options as an array of option names rather than formatting it
>>      as a comma-delimited list into a buffer.
>>      
>>      Sprinkle const on static the static description tables for peace of
>>      mind.
>>      
>>      Don't need to zero memory allocated by calloc.
>>      
>>      Reviewed by:    kp
>>      MFC after:      2 weeks
>>      Differential Revision:  https://reviews.freebsd.org/D29029
>> ---
>>   lib/libifconfig/Makefile            |   2 +-
>>   lib/libifconfig/Symbol.map          |   9 +-
>>   lib/libifconfig/libifconfig.h       |  69 +++++++-
>>   lib/libifconfig/libifconfig_media.c | 339 ++++++++++++++++++++++++------------
>>   share/examples/libifconfig/status.c |  27 ++-
>>   5 files changed, 324 insertions(+), 122 deletions(-)
>>
>> diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile
>> index 73dad36c1dc5..c6f006018427 100644
>> --- a/lib/libifconfig/Makefile
>> +++ b/lib/libifconfig/Makefile
>> @@ -7,7 +7,7 @@ INTERNALLIB=	true
>>   LIBADD=		m
>>   
>>   SHLIBDIR?=	/lib
>> -SHLIB_MAJOR=	1
>> +SHLIB_MAJOR=	2
>>   
>>   VERSION_DEF=	${LIBCSRCDIR}/Versions.def
>>   SYMBOL_MAPS=	${.CURDIR}/Symbol.map
> libifconfig is marked as internal, but we provide symbol versioning for it,
> and do it in the normal FreeBSD namespace.  On one hand, our policy is to
> not bump symvered libs and to provide binary compat shims as needed, on the
> other, this is internal lib.
>
> What is the purpose of maintaining symbol versions for it?


I have work in progress that changes libifconfig to a private lib. I'm 
not sure why markj@ added the symbol map, but I've been forced to 
maintain it for my later changes to work.


-Ryan



More information about the dev-commits-src-all mailing list