summaryrefslogtreecommitdiff
path: root/biosdevname.1
blob: fd0f99b51ee414d6f841cdbc9693881596cf48af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH BIOSDEVNAME 1 "Nov 28, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
biosdevname \- give BIOS-given name of a device
.SH SYNOPSIS
.B biosdevname
.RI [options]\ [args]...
.SH DESCRIPTION
biosdevname takes a kernel device name as an
argument, and returns the BIOS-given name it "should" be.
.SH OPTIONS
.TP
.B \-i, \-\-interface
Treat [args] as ethernet devs
.TP
.B \-d, \-\-debug
Enable debugging
.TP
.B \-\-policy \fI[physical|all_ethN]
.TP
.B \-\-prefix \fI[string]
string use for embedded NICs in the physical policy (default=em)
.SH POLICIES
.br
The
.B physical
policy is the current default.  However, when invoking biosdevname in
udev rules, one should always specify the policy you want, as the
default has changed over time.
.br
The
.B physical
policy uses the following scheme:
.TP
em<port>
for embedded NICs
.TP
pci<slot>#<port>_<virtual instance>
for cards in PCI slots
.br
.TP
The
.B all_ethN
policy makes a best guess at what the device order should be, with
embedded devices first, PCI cards in ascending slot order, and ports
in ascending PCI bus/device/function order breadth-first.  However,
this policy
.I does not work
if your PCI devices are hot-plugged or hot-pluggable, including the
virtual functions on an SR-IOV device.  In a hot-plug scenario, each separate
udev instance will be invoked in parallel, while the device tree is
still being populated with new devices.  Each udev instance will see a
different PCI tree, and thus cannot provide consistent enumeration.
Use of this policy should be limited to only scenarios where all PCI
devices are present at boot (cold-plug).

.SH RETURN CODES
Returns 0 on success, with BIOS-suggested name printed to stdout.
.br
Returns 1 on provided device name lookup failure.
.br
Returns 2 if system BIOS does not provide naming information.
biosdevname requires system BIOS to provide naming information, either
via SMBIOS or sysfs files.

.SH SEE ALSO
.br
http://linux.dell.com/files/biosdevname/
.SH AUTHOR
biosdevname was written by  Matt Domsch <Matt_Domsch@dell.com>
.PP
This manual page was written by Rudy Gevaert <Rudy.Gevaert@UGent.be>,
for the Debian project (but may be used by others).