On 21 Nov 2023, at 19:35, Jamie Landeg-Jones wrote:

> Mike Karels <m...@karels.net> wrote:
>
>> I have a proof of concept that makes the presumed original name
>> (driver name + unit number) available to ifconfig, which prints
>> the string with everything else in the standard output format.
>> I don't think that is the right solution, but the other details
>> should be easy.  I'm tempted to print the driver name and unit
>> number separately, although possibly as two words using the same
>> option.  It should probably be an option rather than a keyword,
>> so something like this:
>>
>> # ifconfig -N interface-name
>> igb 1
>> #
>>
>> Or the unit number could be on a separate option.
>>
>> Comments?
>
> I prefer that idea to the use of "groups" (which can be modified anyway),
> though in your example, that should be documented as "driver name" not
> "interface name", seeing that the returned value is not actually now
> the interface name!

Here, interface-name was a placeholder for the current name of the
interface.  My newer code prints "drivername: igb1" at the end of
the list of values for "ifconfig $interface-name" or "ifconfig -a"
if the -D option is given.  I decided that it was better to be able
to get all the translations at once (for humans, anyway).

                Mike

> (Similary, if a keyword is decided upon, it should be "driver-name"
> not "interface-name")
>
> I realise that writing "interface-name" was probably just muscle-memory,
> but just wanted clarification.
>
> No opinion on where to display the unit number - whatever works out
> better for you.
>
> Cheers, Jamie

Reply via email to