diff options
author | joerg <joerg@FreeBSD.org> | 2004-06-01 20:18:25 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2004-06-01 20:18:25 +0000 |
commit | b2404db737dccebb0e745505c64a69e52027a18e (patch) | |
tree | 7d597620b5b208ccb27384917484492372bc5152 /sys/sys/sun_disklabel.h | |
parent | 33b8939d73235aaa07846c64a4cc0f7dd7f2524b (diff) | |
download | FreeBSD-src-b2404db737dccebb0e745505c64a69e52027a18e.zip FreeBSD-src-b2404db737dccebb0e745505c64a69e52027a18e.tar.gz |
Add SVR4-compatible VTOC-style elements to the Sun label. The
FreeBSD kernel doesn't use them but sunlabel(8) shortly will,
and both these files are used by sunlabel(8).
Diffstat (limited to 'sys/sys/sun_disklabel.h')
-rw-r--r-- | sys/sys/sun_disklabel.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sys/sys/sun_disklabel.h b/sys/sys/sun_disklabel.h index ae1ccb9..e99239f 100644 --- a/sys/sys/sun_disklabel.h +++ b/sys/sys/sun_disklabel.h @@ -1,6 +1,7 @@ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2004, Joerg Wunsch * * This software was developed by the Computer Systems Engineering group * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and @@ -51,6 +52,8 @@ #define SUN_NPART 8 #define SUN_RAWPART 2 #define SUN_SIZE 512 +#define SUN_VTOC_VERSION 1 +#define SUN_VTOC_SANE 0x600DDEEE /* SVR4-compatible VTOC is "sane". */ /* * XXX: I am actually not sure if this should be "16 sectors" or "8192 bytes". * XXX: Considering that Sun went to the effort of getting 512 byte compatible @@ -66,8 +69,40 @@ struct sun_dkpart { u_int32_t sdkp_nsectors; /* number of sectors */ }; +struct sun_vtoc_info { + u_int16_t svtoc_tag; /* partition tag */ + u_int16_t svtoc_flag; /* partition flags */ +}; + +/* known partition tag values */ +#define VTOC_UNASSIGNED 0x00 +#define VTOC_BOOT 0x01 +#define VTOC_ROOT 0x02 +#define VTOC_SWAP 0x03 +#define VTOC_USR 0x04 +#define VTOC_BACKUP 0x05 /* "c" partition, covers entire disk */ +#define VTOC_STAND 0x06 +#define VTOC_VAR 0x07 +#define VTOC_HOME 0x08 +#define VTOC_ALTSCTR 0x09 /* alternate sector partition */ +#define VTOC_CACHE 0x0a /* Solaris cachefs partition */ +#define VTOC_VXVM_PUB 0x0e /* VxVM public region */ +#define VTOC_VXVM_PRIV 0x0f /* VxVM private region */ + +/* VTOC partition flags */ +#define VTOC_UNMNT 0x01 /* unmountable partition */ +#define VTOC_RONLY 0x10 /* partition is read/only */ + struct sun_disklabel { char sl_text[128]; + + /* SVR4 VTOC information */ + u_int32_t sl_vtoc_vers; /* == SUN_VTOC_VERSION */ + u_int16_t sl_vtoc_nparts; /* == SUN_NPART */ + struct sun_vtoc_info sl_vtoc_map[SUN_NPART]; /* partition tag/flag */ + u_int32_t sl_vtoc_sane; /* == SUN_VTOC_SANE */ + + /* Sun label information */ u_int16_t sl_rpm; /* rotational speed */ u_int16_t sl_pcylinders; /* number of physical cyls */ u_int16_t sl_sparespercyl; /* spare sectors per cylinder */ |