199767f8919635c4928607450d9e0abb932109ceToomas Soome * Copyright (c) 2008 Marcel Moolenaar
199767f8919635c4928607450d9e0abb932109ceToomas Soome * All rights reserved.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Redistribution and use in source and binary forms, with or without
199767f8919635c4928607450d9e0abb932109ceToomas Soome * modification, are permitted provided that the following conditions
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 1. Redistributions of source code must retain the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 2. Redistributions in binary form must reproduce the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer in the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * documentation and/or other materials provided with the distribution.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
199767f8919635c4928607450d9e0abb932109ceToomas Soome * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
199767f8919635c4928607450d9e0abb932109ceToomas Soome * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
199767f8919635c4928607450d9e0abb932109ceToomas Soome * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
199767f8919635c4928607450d9e0abb932109ceToomas Soome * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
199767f8919635c4928607450d9e0abb932109ceToomas Soome * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
199767f8919635c4928607450d9e0abb932109ceToomas Soome * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define VTOC_TAG_BACKUP 0x05 /* "c" partition */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define VTOC_TAG_ALTSCTR 0x09 /* alternate sector partition */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define VTOC_TAG_CACHE 0x0a /* Solaris cachefs partition */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define VTOC_TAG_VXVM_PUB 0x0e /* VxVM public region */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define VTOC_TAG_VXVM_PRIV 0x0f /* VxVM private region */
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* NetBSD/mips defines this */
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* FreeBSD tags: the high byte equals ELFOSABI_FREEBSD */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define VTOC_FLAG_UNMNT 0x01 /* unmountable partition */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define VTOC_FLAG_RDONLY 0x10 /* partition is read/only */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define DK_LABEL_LOC 1 /* location of disk label */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define LEN_DKL_ASCII 128 /* length of dkl_asciilabel */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define DK_LABEL_SIZE 512 /* size of disk label */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define DK_MAX_BLOCKS 0x7fffffff /* max # of blocks handled */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint32_t v_bootinfo[3]; /* info needed by mboot (unsupported) */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t v_sectorsz; /* sector size in bytes */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint32_t p_start;/* start sector no of partition */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint32_t timestamp[NDKMAP]; /* partition timestamp (unsupported) */
199767f8919635c4928607450d9e0abb932109ceToomas Soome char v_asciilabel[LEN_DKL_ASCII]; /* for compatibility */
199767f8919635c4928607450d9e0abb932109ceToomas Soome ((sizeof (struct dk_vtoc) + \
199767f8919635c4928607450d9e0abb932109ceToomas Soome struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint32_t dkl_pcyl; /* # of physical cylinders */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_acyl; /* # of alternate cylinders */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint32_t dkl_nsect; /* # of data sectors per track */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_apc; /* alternates per cyl (SCSI only) */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_read_reinstruct; /* # sectors to skip, reads */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_extra[4]; /* for compatible expansion */
199767f8919635c4928607450d9e0abb932109ceToomas Soome char dkl_pad[LEN_DKL_PAD]; /* unused part of 512 bytes */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_magic; /* identifies this label format */
199767f8919635c4928607450d9e0abb932109ceToomas Soome uint16_t dkl_cksum; /* xor checksum of sector */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* _SYS_VTOC_H_ */