summaryrefslogtreecommitdiff
path: root/biosdevname.1
blob: 8bfd8cadac8e60df30f9984f920179b124c5a308 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.\"                                      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)
.TP
.B \-\-nopirq
Do not use $PIR table for mapping PCI device to slot. Some BIOS have
incorrect values.
.TP
.B \-\-smbios \fI[x.y]
Require minimum SMBIOS version x.y
.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
p<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 EXIT 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.
.br
Returns 3 if not run as root but requires root privileges.
.br
Returns 4 if running in a virtual machine.

.SH SEE ALSO
.br
http://linux.dell.com/wiki/index.php/Oss/libnetdevname
.br
http://linux.dell.com/files/biosdevname/
.br
git://linux.dell.com/biosdevname.git

.SH RELATED PROGRAMS
.br
The
.B dmidecode
package contains two tools useful for debugging BIOS features that
biosdevname uses, specifically
.B dmidecode
to read the SMBIOS Type 9 and Type 41 tables, and
.B biosdecode
to read the PCI IRQ Routing Table.  Please include the output of each
of these programs in any bug reports.
.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).