From owner-man-jp-reviewer@jp.freebsd.org  Tue May 19 08:24:22 1998
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) id IAA17386
	Tue, 19 May 1998 08:24:22 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) with ESMTP id IAA17381
	for <man-jp-reviewer@jp.freebsd.org>; Tue, 19 May 1998 08:24:20 +0900 (JST)
Received: from pallo.on.rim.or.jp (ppp076.on.rim.or.jp [202.247.138.204]) by april.on.rim.or.jp (8.8.5/3.4Wbeta6-rim1.1) with ESMTP id IAA18315; Tue, 19 May 1998 08:24:18 +0900 (JST)
Message-Id: <199805182324.IAA18315@april.on.rim.or.jp>
Received: from localhost by pallo.on.rim.or.jp (8.8.5/3.5Wpl5-97062619)
	id IAA00724; Tue, 19 May 1998 08:22:34 +0900 (JST)
To: man-jp-reviewer@jp.freebsd.org
From: Yoshishige Arai <ryo2@on.rim.or.jp>
X-Mailer: Mew version 1.70 on Emacs 19.28.1 / Mule 2.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Date: Tue, 19 May 1998 08:22:32 +0900
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=24]
X-Sequence: man-jp-reviewer 139
Subject: [man-jp-reviewer 139] disklabel.5
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org

$B9S0f$G$9!#(B

disklabe.5 $B$G$9$,!"(Broff$B$K$+$1$k$H(B 106$B9TL\$"$?$j$N(B

>The format of the disk label, as specified in
>.Aw Pa sys/disklabel.h ,
>is
$B$N$H$3$m$G!"(B sys/disklabel.h $B$,>C$($F8+$($^$9!#(B.Aw $B$H$$$&%^%/%m$,$I$&(B
$B$b8+Ev$?$i$J$$$N$G$9$,!"3'$5$s$N$H$3$m$G$O$A$c$s$H=P$k$G$7$g$&$+!#(B
$B%U%)!<%^%C%H$O(B 2.2.6-stable $B$G%U%)!<%^%C%H$7$F5$$,$D$$$?$s$G$9$,!":#$=(B
$B$N%^%7%s$N(B BIOS $B$rHt$P$7$F$7$^$C$FF~1!Cf(B($B$7$/$7$/(B)$B$J$N$G!"(Bjman $B$N%P!<(B
$B%8%g%s$O3NG'$G$-$^$;$s!#(Bjgroff $B$O:G?7(B port $B$+$iF~$l$^$7$?!#(B
# ".Pa sys/disklabel.h"$B$K$7$F$7$^$C$F$O$^$:$$$+$J(B...$B$=$l$@$H8+$($k(B(^^;

"in-core copy of label" $B$rJ#<L$HLu$9$H$I$&$b0UL#$,H=$j$K$/$/8+$($?$N$G!"(B
"$B%i%Y%k$NFbIt%3%T!<(B" $B$H$7$F$"$j$^$9!#(B
primary bootstrap/secondary bootstrap $B$O!V0l<!%V!<%H%9%H%i%C%W!W!VFs<!!D!W(B
$B$GNI$$$G$7$g$&$+(B?

$BB>(B .Sh HISTORY $B$,$"$k$N$K!"Cf?H$,$J$$$N$,$A$g$C$H5$$K$J$j$^$9!#(B

$B$G$O(B disklabel.5 $B$$$-$^$9!#(B($B$^$@(B send-jpman$BA0$G$9(B)

.\" Copyright (c) 1987, 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Symmetric Computer Systems.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)disklabel.5.5	8.1 (Berkeley) 6/5/93
.\" jpman %Id: disklabel.5,v 0.0 1998/04/24 15:56:30 horikawa Stab %
.\"
.Dd June 5, 1993
.Dt DISKLABEL 5
.Os
.Sh $BL>>N(B
.Nm disklabel
.Nd $B%G%#%9%/%i%Y%k(B
.Sh $B=q<0(B
.Fd #include <sys/disklabel.h>
.Sh $B2r@b(B
$B%7%9%F%`>e$N$=$l$>$l$N%G%#%9%/$d%G%#%9%/%Q%C%/$O!"%G%#%9%/$N%8%*%a%H%j(B
$B$d%G%#%9%/$,J,3d$5$l$?%Q!<%F%#%7%g%s$K$D$$$F$N>\:Y$J>pJs$rDs6!$9$k%G%#(B
$B%9%/%i%Y%k$r4^$`$3$H$,$G$-$^$9!#(B
$B$=$l$O!"%G%#%9%/$,%U%)!<%^%C%H$5$l$?$H$-$K=i4|2=$5$l$J$1$l$P$J$i$:!"(B
$B8e$+$i(B
.Xr disklabel 8
$B%W%m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
.Xr disklabel
$B%3%^%s%I$r;H$C$F9T$J$o$l$^$9!#(B
.Pp
.Aw Pa sys/disklabel.h
$B$G;XDj$5$l$k$h$&$K%G%#%9%/%i%Y%k$N%U%)!<%^%C%H$O0J2<$N$h$&$K$J$j$^$9!#(B
.Bd -literal
/*
* $B%G%#%9%/5-=R%F!<%V%k(B, disktab(5) $B$r;2>H(B
*/
#define	DISKTAB		"/etc/disktab"

/*
* $B3F%G%#%9%/$O%O!<%I%&%'%"%G%#%9%/%8%*%a%H%j!"%U%!%$%k%7%9%F%`%Q!<%F%#(B
* $B%7%g%s!"%I%i%$%V8GM-$N>pJs$K$D$$$F$N>pJs$r4^$`%i%Y%k$r;}$C$F$$$^$9!#(B
* $B%i%Y%k$O%V%m%C%/(B 0 $B$+(B 1 $B!"$D$^$j%V!<%H%9%H%i%C%WEy$N$?$a$N>l=j$r6u$1$F(B
* $B$J$k$Y$/@hF,$N%*%U%;%C%H$K$"$j$^$9!#(B
*/

#ifndef	LABELSECTOR
#define LABELSECTOR	0			/* $B%i%Y%k$r4^$`%;%/%?(B */
#endif

#ifndef	LABELOFFSET
#define LABELOFFSET	64			/* $B%;%/%?Fb$N%i%Y%k$N%*%U%;%C%H(B */
#endif

#define DISKMAGIC	((u_long) 0x82564557)	/* $B%G%#%9%/$N%^%8%C%/%J%s%P(B */
#ifndef MAXPARTITIONS
#define	MAXPARTITIONS	8
#endif

#ifndef LOCORE
struct disklabel {
	u_long	d_magic;	/* $B%^%8%C%/%J%s%P(B */
	short	d_type;		/* $B%I%i%$%V%?%$%W(B */
	short	d_subtype;	/* controller/d_type $B$K8GM-(B */
	char	d_typename[16];	/* $B%?%$%WL>!"$?$H$($P(B "eagle" */
	/* 
	* d_packname $B$O!"%Q%C%/<1JL;R$r4^$_!"%G%#%9%/%i%Y%k$,%G%#%9%/(B
	* $B$dFbIt%3%T!<$rFI$_=*$($?$H$-$KJV$5$l$^$9!#(B
	* d_boot0 $B$H(B d_boot1 $B$O!"(B/usr/mdec $B$K8+$i$l$k$h$&$K0l<!(B (block0)
	* $B$^$?$OFs<!(B (block 1-15) $B%V!<%H%9%H%i%C%W$N(B ($BG$0U$N(B) $BL>A0$G$9!#(B
	* $B$3$NL>$O!"(B/etc/disktab $B$+$iCM$r<h$j=P$9$?$a$K(B getdiskbyname(3)
	* $B$r;H$&>l9g$KJV$5$l$^$9!#(B
	*/
#if defined(KERNEL) || defined(STANDALONE)
	char	d_packname[16];		/* $B%Q%C%/<1JL;R(B */ 
#else
	union {
		char	un_d_packname[16];	/* $B%Q%C%/<1JL;R(B */ 
		struct {
			char *un_d_boot0;	/* $B0l<!%V!<%H%9%H%i%C%WL>(B */
			char *un_d_boot1;	/* $BFs<!%V!<%H%9%H%i%C%WL>(B */
		} un_b; 
	} d_un; 

#define d_packname	d_un.un_d_packname
#define d_boot0		d_un.un_b.un_d_boot0
#define d_boot1		d_un.un_b.un_d_boot1
#endif	/* ! KERNEL or STANDALONE */

	/* $B%G%#%9%/%8%*%a%H%j(B */
	u_long	d_secsize;	/* $B%;%/%?$"$?$j$N%P%$%H?t(B */
	u_long	d_nsectors;	/* $B%H%i%C%/$"$?$j$N%G!<%?%;%/%??t(B */
	u_long	d_ntracks;	/* $B%7%j%s%@$"$?$j$N%H%i%C%/?t(B */
	u_long	d_ncylinders;	/* $B%f%K%C%H$"$?$j$N%G!<%?%7%j%s%@?t(B */
	u_long	d_secpercyl;	/* $B%7%j%s%@$"$?$j$N%G!<%?%;%/%??t(B */
	u_long	d_secperunit;	/* $B%f%K%C%H$"$?$j$N%G!<%?%;%/%??t(B */
	/*
	* $B0J2<$NM=Hw(B ($B%P%C%I%;%/%?CV49(B) $B$O(B in d_nsectors $B$d(B d_secpercyl
	* $B$K$O?t$($i$l$^$;$s!#(B
	* $BM=Hw%;%/%?$O!"3F%H%i%C%/$^$?$O%7%j%s%@$NKvHx$N>l=j$r@j$a$k(B
	* $BJ*M}%;%/%?$K$"$k$H?dDj$5$l$^$9!#(B
	*/
	u_short	d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(B d_cylskew $B$O!"%7%j%s%@(B N-1 $B>e$N%;%/%?(B 0 $B$+$i%7%j%s%@(B N
	* $B>e$N%;%/%?(B 0 $B$NAjBPE*$J%*%U%;%C%H$G$9!#(B
	*/
	u_short	d_rpm;	/* $B2sE>%9%T!<%I(B */
	u_short	d_interleave;	/* $B%O!<%I%&%'%"%;%/%?%$%s%?%j!<%V(B */
	u_short	d_trackskew;	/* $B%H%i%C%/$"$?$j$N%;%/%?(B 0 $B:9(B */
	u_short	d_cylskew;	/* $B%7%j%s%@$"$?$j$N%;%/%?(B 0 $B:9(B */
	u_long	d_headswitch;	/* $B%O!<%I%9%$%C%A;~4V(B usec */
	u_long	d_trkseek;	/* $B%H%i%C%/4V%7!<%/(B usec */
	u_long	d_flags;	/* $B0lHL%U%i%0(B */
#define NDDATA 5
	u_long	d_drivedata[NDDATA];	/* $B%I%i%$%V$N7?8GM-$N>pJs(B */
#define NSPARE 5
	u_long	d_spare[NSPARE];	/* $B>-Mh;H$&$?$a$NM=Hw(B */
	u_long	d_magic2;	/* $B%^%8%C%/%J%s%P(B ($B:FEY(B) */
	u_short	d_checksum;	/* $B%G!<%?$r4^$`%Q!<%F%#%7%g%s$N(B xor */

	/* $B%U%!%$%k%7%9%F%`$H%Q!<%F%#%7%g%s>pJs(B */
	u_short	d_npartitions;	/* $B8e$KB3$/%Q!<%F%#%7%g%s?t(B */
	u_long	d_bbsize;	/* sn0 $B$N%V!<%HNN0h$NBg$-$5(B bytes */
	u_long	d_sbsize;	/* fs $B%9!<%Q%V%m%C%/$N:GBg%5%$%:(B bytes */
	struct	partition {	/* $B%Q!<%F%#%7%g%s%F!<%V%k(B */
		u_long	p_size;	/* $B%Q!<%F%#%7%g%sFb$N%;%/%??t(B */
		u_long	p_offset;	/* $B3+;O%;%/%?(B */
		u_long	p_fsize;	/* $B%U%!%$%k%7%9%F%`5,Dj%U%i%0%a%s%H%5%$%:(B */
		u_char	p_fstype;	/* $B%U%!%$%k%7%9%F%`%?%$%W!"2<5-;2>H(B */
		u_char	p_frag;	/* $B%V%m%C%/$"$?$j$N%U%!%$%k%7%9%F%`%U%i%0%a%s%H(B */
		union {
			u_short	cpg;	/* UFS: FS $B%0%k!<%W$"$?$j$N%7%j%s%@?t(B */
			u_short	sgs;	/* LFS: FS $B%;%0%a%s%H%7%U%H(B */
		} __partition_u1;
#define	p_cpg	__partition_u1.cpg
#define	p_sgs	__partition_u1.sgs
		u_short	p_cpg;	/* $B%0%k!<%W$"$?$j$N%U%!%$%k%7%9%F%`%7%j%s%@?t(B */
	} d_partitions[MAXPARTITIONS];	/* $B<B:]$K$O$b$C$H$"$k(B */
};

/* d_type values: */
#define	DTYPE_SMD	1	/* SMD, XSMD; VAX hp/up */
#define	DTYPE_MSCP	2	/* MSCP */
#define	DTYPE_DEC	3	/* other DEC (rk, rl) */
#define	DTYPE_SCSI	4	/* SCSI */
#define	DTYPE_ESDI	5	/* ESDI $B%$%s%?%U%'!<%9(B */
#define	DTYPE_ST506	6	/* ST506 $BB>(B */
#define	DTYPE_HPIB	7	/* CS/80 on HP-IB */
#define	DTYPE_HPFL	8	/* HP $B%U%!%$%P%j%s%/(B */
#define	DTYPE_FLOPPY	10	/* $B%U%m%C%T!<(B */

#ifdef DKTYPENAMES
static char *dktypenames[] = {
	"unknown",
	"SMD",
	"MSCP",
	"old DEC",
	"SCSI",
	"ESDI",
	"ST506",
	"HP-IB",
	"HP-FL",
	"type 9",
	"floppy",
	0
};
#define DKMAXTYPES	(sizeof(dktypenames) / sizeof(dktypenames[0]) - 1)
#endif

/*
* $B%U%!%$%k%7%9%F%`%?%$%W$H%P!<%8%g%s(B
* $B%Q!<%F%#%7%g%s$"$?$j$NB>$N%U%!%$%k%7%9%F%`8GM->pJs$K;H$o$l$^$9!#(B
*/
#define	FS_UNUSED	0	/* $BL$;HMQ(B */
#define	FS_SWAP		1	/* $B%9%o%C%W(B */
#define	FS_V6		2	/* $BBh(B 6 $BHG(B */
#define	FS_V7		3	/* $BBh(B 7 $BHG(B */
#define	FS_SYSV		4	/* System V */
#define	FS_V71K		5	/* 7 $BHG(B 1K $B%V%m%C%/(B (4.1, 2.9) */
#define	FS_V8		6	/* 8 $BHG(B 4K $B%V%m%C%/(B */
#define	FS_BSDFFS	7	/* 4.2BSD fast $B%U%!%$%k%7%9%F%`(B */
#define	FS_MSDOS	8	/* MSDOS $B%U%!%$%k%7%9%F%`(B */
#define	FS_BSDLFS	9	/* 4.4BSD log-structured $B%U%!%$%k%7%9%F%`(B */
#define	FS_OTHER	10	/* $B;HMQCf$@$,L$CN!?L$%5%]!<%H(B */
#define	FS_HPFS		11	/* OS/2 high-performance $B%U%!%$%k%7%9%F%`(B */
#define	FS_ISO9660	12	/* ISO 9660 $BIaDL(B CD-ROM */
#define	FS_BOOT		13	/* $B%V!<%H%9%H%i%C%W$r4^$`%Q!<%F%#%7%g%s(B */

#ifdef	DKTYPENAMES
static char *fstypenames[] = {
	"unused",
	"swap",
	"Version 6",
	"Version 7",
	"System V",
	"4.1BSD",
	"Eighth Edition",
	"4.2BSD",
	"MSDOS",
	"4.4LFS",
	"unknown",
	"HPFS",
	"ISO9660",
	"boot",
	0
};
#define FSMAXTYPES	(sizeof(fstypenames) / sizeof(fstypenames[0]) - 1)
#endif

/*
* flags shared by various drives:
*/
#define	D_REMOVABLE	0x01	/* $B%j%`!<%P%V%k%a%G%#%"(B */
#define	D_ECC		0x02	/* ECC $B%5%]!<%H(B */
#define	D_BADSECT	0x04	/* $B%P%C%I%;%/%?%U%)%o!<%I$N%5%]!<%H(B */
#define	D_RAMDISK	0x08	/* $B%G%#%9%/%(%_%e%l!<%?(B */
#define	D_CHAIN		0x10	/* back-back $BE>Aw$,$G$-$k(B */

/*
* Drive data for SMD.
*/

#define	d_smdflags	d_drivedata[0]
#define	D_SSE		0x1	/* $B%;%/%?%9%-%C%W$N%5%]!<%H(B */
#define	d_mindist	d_drivedata[1]
#define	d_maxdist	d_drivedata[2]
#define	d_sdist		d_drivedata[3]

/*
* Drive data for ST506.
*/
#define d_precompcyl	d_drivedata[0]
#define d_gap3		d_drivedata[1]	/* $B%U%)!<%^%C%H;~$K$N$_;H$o$l$k(B */

/*
 * Drive data for SCSI.
 */
#define	d_blind		d_drivedata[0]

#ifndef LOCORE
/*
* $B%U%)!<%^%C%H$d@8$NA`:n$r$9$k:]$K;H$o$l$k(B
* $B9=B$BN$G!"%G!<%?$d%l%8%9%?CM$rJV$7$^$9!#(B
* $B%l%8%9%?$N<1JL$H%U%)!<%^%C%H$O!"(B
* $B%G%P%$%90MB8!"%I%i%$%P0MB8$G$9!#(B
*/
struct format_op {
	char	*df_buf;
	int	df_count;	/* $BCM(B-$B7k2L(B */
	daddr_t	df_startblk;
	int	df_reg[8];	/* $B7k2L(B */
};

/*
* $B%G%#%9%/>e$N%Q!<%F%#%7%g%s$K4X$9$k>pJs$r(B
* $B0z$-=P$9$?$a$KFbIt$G;H$o$l$k9=B$BN(B
*/
struct partinfo {
	struct	disklabel *disklab;
	struct	partition *part;
};

/*
* $B%G%#%9%/8GM-$N(B ioctl
*/
	/* $B%G%#%9%/%i%Y%k$N<hF@$H@_Dj(B; $BFbIt$G$O(B DIOCGPART $B$,;H$o$l$k(B */
#define DIOCGDINFO   _IOR('d', 101, struct disklabel) /* $B<hF@(B */
#define DIOCSDINFO   _IOW('d', 102, struct disklabel) /* $B@_Dj(B */
#define DIOCWDINFO   _IOW('d', 103, struct disklabel) /* $B@_Dj!"%G%#%9%/99?7(B */
#define DIOCGPART    _IOW('d', 104, struct partinfo)  /* $B%Q!<%F%#%7%g%s<hF@(B */

/* do format operation, read or write */
#define DIOCRFORMAT	_IOWR('d', 105, struct format_op)
#define DIOCWFORMAT	_IOWR('d', 106, struct format_op)

#define DIOCSSTEP	_IOW('d', 107, int) /* $B%9%F%C%W%l!<%H@_Dj(B */
#define DIOCSRETRIES	_IOW('d', 108, int) /* $B%j%H%i%$$N@_Dj(B */
#define DIOCWLABEL	_IOW('d', 109, int) /* $B=q$-9~$_2D!?IU2C$N%i%Y%k(B */

#define DIOCSBAD	_IOW('d', 110, struct dkbad) /* $B%+!<%M%k(B dkbad $B$N@_Dj(B*/

#endif LOCORE
.Ed
.Sh $B4XO"9`L\(B
.Xr disktab 5 ,
.Xr disklabel 8
.Sh $BNr;K(B
