1DEV_ALLOC_NAME(9)           Network device support           DEV_ALLOC_NAME(9)
2
3
4

NAME

6       dev_alloc_name - allocate a name for a device
7

SYNOPSIS

9       int dev_alloc_name(struct net_device * dev, const char * name);
10

ARGUMENTS

12       dev
13           device
14
15       name
16           name format string
17

DESCRIPTION

19       Passed a format string - eg “ltd” it will try and find a suitable id.
20       It scans list of devices to build up a free map, then chooses the first
21       empty slot. The caller must hold the dev_base or rtnl lock while
22       allocating the name and adding the device in order to avoid duplicates.
23       Limited to bits_per_byte * page size devices (ie 32K on most
24       platforms). Returns the number of the unit assigned or a negative errno
25       code.
26
28Kernel Hackers Manual 2.6.         June 2019                 DEV_ALLOC_NAME(9)
Impressum