HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 23

Creating Device Files

Page 23 highlights

Devices 69 -1 72 -1 73 -1 74 -1 112 24 116 -1 119 -1 122 -1 122 -1 156 -1 157 -1 159 -1 164 -1 168 -1 174 -1 188 31 189 -1 203 -1 207 -1 216 -1 227 -1 229 -1 dev_config clone strlog sad pflop echo dlpi inet_cots inet_cots ptm pts ps2 pipedev beep framebuf sdisk klog sctl sy CentIf kepd ite pseudo pseudo pseudo pseudo floppy pseudo pseudo unknown unknown strptym strptys ps2 unknown graf_pseudo graf_pseudo disk pseudo ctl pseudo ext_bus pseudo graf_pseudo The first two columns list character and block major numbers respectively. A -1 in either column means that a major number does not exist for that type of driver. Note that in the example above the SCSI disk driver (sdisk) has both a character and a block major number. Thus a long listing of the device files for such a disk at SCSI address 6 would look like the following: # ls -l /dev/*dsk/c0t6d0 /dev/dsk: total 0 brw-r----- 1 root sys 31 0x006000 Aug 11 11:56 c0t6d0 /dev/rdsk: total 0 crw-r----- 1 root sys 188 0x006000 Aug 11 11:50 c0t6d0 The directory containing the block device file, with a major number of 31, is /dev/dsk, and the directory containing the character device file is /dev/rdsk. (The letter r is used here because character mode is often referred to as "raw" mode). The minor number is an encryption of address and configuration information. It typically defines one or both of the following: • The device's physical address • operational information, such as tape density or rewind options in the case of tape drives. Note that the minor number and the device file name are similar. The reason for this similarity brings us to the topic of Creating Device Files. Creating Device Files In most cases you do not need to create device files. When HP-UX is first installed, the insf command creates devices files for all devices found by the system during its hardware probe. Then each time the system is rebooted, insf creates device files for any new devices that have been connected to the system. Hence, most devices you use will have a device file automatically created for them at boot time. There are times when you need to create device files manually, such as: • To restore device files accidentally deleted • To override standard naming conventions • To create device files HP-UX cannot create 18

  • 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
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Devices
18
69
-1
dev_config
pseudo
72
-1
clone
pseudo
73
-1
strlog
pseudo
74
-1
sad
pseudo
112
24
pflop
floppy
116
-1
echo
pseudo
119
-1
dlpi
pseudo
122
-1
inet_cots
unknown
122
-1
inet_cots
unknown
156
-1
ptm
strptym
157
-1
pts
strptys
159
-1
ps2
ps2
164
-1
pipedev
unknown
168
-1
beep
graf_pseudo
174
-1
framebuf
graf_pseudo
188
31
sdisk
disk
189
-1
klog
pseudo
203
-1
sctl
ctl
207
-1
sy
pseudo
216
-1
CentIf
ext_bus
227
-1
kepd
pseudo
229
-1
ite
graf_pseudo
The first two columns list character and block major numbers respectively. A
-1
in either column means
that a major number does not exist for that type of driver. Note that in the example above the SCSI disk
driver (
sdisk
) has both a character and a block major number.
Thus a long listing of the device files for
such a disk at SCSI address
6
would look like the following:
# ls -l /dev/*dsk/c0t6d0
/dev/dsk:
total 0
brw-r----- 1 root sys
31 0x006000 Aug 11 11:56 c0t6d0
/dev/rdsk:
total 0
crw-r----- 1 root sys 188 0x006000 Aug 11 11:50 c0t6d0
The directory containing the block device file, with a major number of
31
, is
/dev/dsk
, and the directory
containing the character device file is
/dev/rdsk
. (The letter
r
is used here because character mode is often
referred to as ²raw³ mode).
The minor number is an encryption of address and configuration information. It typically defines one or
both of the following:
The device±s physical address
operational information, such as tape density or rewind options in the case of tape drives.
Note that the minor number and the device file name are similar. The reason for this similarity brings us to
the topic of Creating Device Files.
Creating Device Files
In most cases you do not need to create device files. When HP-UX is first installed, the
insf
command
creates devices files for all devices found by the system during its hardware probe.
Then each time the
system is rebooted,
insf
creates device files for any new devices that have been connected to the system.
Hence, most devices you use will have a device file automatically created for them at boot time.
There are times when you need to create device files manually, such as:
To restore device files accidentally deleted
To override standard naming conventions
To create device files HP-UX cannot create