File: sd.4

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (147 lines) | stat: -rw-r--r-- 4,176 bytes parent folder | download | duplicates (2)
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.\" sd.4
.\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Japanese Version Copyright (c) 1996,1997 ISHIKAWA Mutsumi
.\"         all rights reserved.
.\" Translated 1997-02-06, ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
.\" Updated 2005-11-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.\" WORD:	pointer		ݥ
.\" WORD:	structure	¤
.\" WORD:	geometry	ȥ
.\" WORD:	sector		
.\" WORD:	implement	
.\" WORD:	raw device	ǥХ
.\"
.TH SD 4 1992-12-17 "Linux" "Linux Programmer's Manual"
.SH ̾
sd \- SCSI ǥɥ饤֤ΤΥɥ饤
.SH 
.nf
.BR "#include <linux/hdreg.h>        " "/* for HDIO_GETGEO */"
.BR "#include <linux/fs.h>           " "/* for BLKGETSIZE and BLKRRPART */"
.fi
.SH 
Υ֥åǥХ (block device) ̾ϡΤ褦ʷȤ:
.BI sd lp,
Τ
.I l
ʪɥ饤֤̣ʸǤꡢ
.I p
Ϥʪɥ饤־Υѡƥ (partition) ̣Ǥ롣
ѡƥʥС
.I p
ʤϡΥǥХեϥɥ饤Τ򤵤

SCSI ǥϥ᥸㡼ʥС 8 Τ褦ʷΥޥʡʥС
ġ(16 *
.IR drive_number ") + " partition_number 

.I drive_number
ϸФ줿ʪɥ饤ֹ֤Ǥꡢ
.I partition_number
ϼΤ褦ˤʤ:
.sp
ѡƥ 0 ϥɥ饤
.br
ѡƥ 1  4  DOS  " (primary)" ѡƥ
.br
ѡƥ 5  8  DOS  "ĥ (extended)" (ޤϡ"
(logical)") ѡƥ

㤨С
.I /dev/sda
ϥ᥸㡼ʥС 8 ޥʡʥС 0 ƥκǽ SCSI
ɥ饤Τ򻲾Ȥ롣ơ
.I /dev/sdb3
ϥ᥸㡼ʥС 8 ޥʡʥС 19 ƥܤ
SCSI ɥ饤֤λܤ DOS "" ѡƥ򻲾Ȥ롣

ߤϡ֥åǥХ󶡤Ƥ롣ǥХ (raw device)
ϤޤƤʤ
.SH 

.I ioctl
󶡤Ƥ:
.TP
.B HDIO_GETGEO
.RS
Τ褦ʹ¤ΤѤ BIOS Υǥѥ᡼֤:
.in +4n
.nf

struct hd_geometry {
    unsigned char  heads;
    unsigned char  sectors;
    unsigned short cylinders;
    unsigned long  start;
};
.fi
.in

ι¤ΤؤΥݥ󥿤
.BR ioctl (2)
ؤΥѥ᡼ȤϤ롣

Υѥ᡼֤ϡ
.I "DOS ˤä򤵤褦"
ɥ饤֤ΥȥǤ롣
Υȥϡɥ饤֤ʪŪʥȥ
.I ǤϤʤ
ξϥɥ饤֤Υѡƥơ֥Ѥ롢
ޤ
.BR fdisk (1),
.BR efdisk (1),
.BR lilo (1)
ŬڤɬפǤ롣
⤷ȥξʤС줾Ƥ˥
֤롣
.RE
.TP
.B BLKGETSIZE
οɽǥХΥ֤롣
.BR ioctl (2)
Υѥ᡼ϡ
.I long
ؤΥݥ󥿤ǤʤФʤʤ
.TP
.B BLKRRPART
ŪˡSCSI ǥΥѡƥơ֥κɤ߹ߤԤ
ѥ᡼ɬפʤ

.BR scsi (4)

.BR ioctl (2)
Ʊͤ˥ݡȤ롣
.BR ioctl (2)
Υѥ᡼ɬפǡ줬 NULL ʤС
.BR ioctl (2)
ϥ顼
.B EINVAL
ǼԤ롣
.SH ե
/dev/sd[a\-h]: ɥ饤
.br
/dev/sd[a\-h][0\-8]: ġΥ֥åѡƥ
.\" .SH Ϣ
.\" .BR scsi (4)