Re: [RFC PATCH 2/5] can: slcan: remove legacy infrastructure

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

 



On Mon, 18 Jul 2022 12:23:05 +0200
Oliver Hartkopp <socketcan@xxxxxxxxxxxx> wrote:

> IMO it does not break user space when slcan gets the common naming 
> schema for CAN interface names.

For what it's worth, slcan provides a specific ioctl to resolve from
(tty fd) to (netdev name). As far as I can see, any sane program should
use this API to find whatever device it has created, irrespective of
the netdev name.


@ Marc: slcand and slcan_attach in can-utils do not depend on the
slcanX name, as far as I can see. They are the main interfaces to
slcan, and apart from that I can only think of scripts doing netlink
stuff and scanning for slcanX. Does this change your opinion, or is
breaking such scripts already a step too far?

I'm thinking that in other circumstances, I've had cases where devices
were numbered differently just because they enumerated faster or slower
at different boots, or with other kernel versions, or because of media
inserted, etc. - though renumbering is of course one step less than
changing the prefix.


> We had the same thing with 'eth0' which is now named enblablabla or 
> 'wlan0' now named wlp2s0.

Actually, the kernel still calls them ethX and wlanX. It's systemd+udev
that renames them to the "unique" names afterwards. It's an extra step
that happens in userspace.

udev is immensely useful, but also great stuff for race conditions :)



Max



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux