|
|
1.1 root 1: .TH INTRO 3
2: .SH NAME
3: intro \- introduction to the Plan 9 devices
4: .SH DESCRIPTION
5: A Plan 9
6: .I device
7: implements a file tree for client processes.
8: A file name beginning with a pound sign, such as
9: .LR #c ,
10: names the root of a file tree implemented by
11: a particular
12: .IR "kernel device driver"
13: identified by the character after the pound sign.
14: Such names are usually bound to conventional locations
15: in the name space.
16: For example, after
17: .IP
18: .EX
19: bind("#c", "/dev", MREPL)
20: .EE
21: .LP
22: an
23: .IR ls (1)
24: of
25: .B /dev
26: will list the files provided by the
27: .I console
28: device.
29: .PP
30: A kernel device driver is a
31: .I server
32: in the sense of the Plan 9 File Protocol, 9P (see Section 5),
33: but with the messages implemented by local
34: rather than remote procedure calls.
35: Also, several of the messages
36: .RI ( Nop ,
37: .IR Session ,
38: .IR Flush ,
39: and
40: .IR Error )
41: have no subroutine equivalents.
42: .PP
43: When a system call is passed a file name beginning with
44: .L "#"
45: it looks at the next character, and if that is a valid
46: .I device character
47: it performs an
48: .IR attach (5)
49: on the corresponding device to get a channel representing the
50: root of that device's file tree.
51: If there are any characters after the device character but
52: before the next
53: .L "/"
54: or end of string, those characters are passed as parameter
55: .I aname
56: to the attach. For example,
57: .IP
58: .EX
59: #Itcp
60: .EE
61: .PP
62: identifies the implementation of the TCP protocol supplied by the IP device
63: (see
64: .IR ip (3)).
65: .PP
66: Each kernel device has a conventional place at which to be bound
67: to the name space.
68: The
69: .I SYNOPSIS
70: sections of the following pages includes a shell
71: .I bind
72: command to put the device in the conventional place.
73: Most of these binds are done automatically by
74: .IR init (8).
75: .SH SEE ALSO
76: .IR intro (5),
77: .IR intro (2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.