The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/vtoc.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2008 Marcel Moolenaar
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  *
   15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   25  *
   26  * $FreeBSD: releng/8.3/sys/sys/vtoc.h 209077 2010-06-11 22:25:50Z marius $
   27  */
   28 
   29 #ifndef _SYS_VTOC_H_
   30 #define _SYS_VTOC_H_
   31 
   32 #define VTOC_TAG_UNASSIGNED     0x00
   33 #define VTOC_TAG_BOOT           0x01
   34 #define VTOC_TAG_ROOT           0x02
   35 #define VTOC_TAG_SWAP           0x03
   36 #define VTOC_TAG_USR            0x04
   37 #define VTOC_TAG_BACKUP         0x05    /* "c" partition */
   38 #define VTOC_TAG_STAND          0x06
   39 #define VTOC_TAG_VAR            0x07
   40 #define VTOC_TAG_HOME           0x08
   41 #define VTOC_TAG_ALTSCTR        0x09    /* alternate sector partition */
   42 #define VTOC_TAG_CACHE          0x0a    /* Solaris cachefs partition */
   43 #define VTOC_TAG_VXVM_PUB       0x0e    /* VxVM public region */
   44 #define VTOC_TAG_VXVM_PRIV      0x0f    /* VxVM private region */
   45 
   46 /* NetBSD/mips defines this */
   47 #define VTOC_TAG_NETBSD_FFS     0xff
   48 
   49 /* FreeBSD tags: the high byte equals ELFOSABI_FREEBSD */
   50 #define VTOC_TAG_FREEBSD_SWAP   0x0901
   51 #define VTOC_TAG_FREEBSD_UFS    0x0902
   52 #define VTOC_TAG_FREEBSD_VINUM  0x0903
   53 #define VTOC_TAG_FREEBSD_ZFS    0x0904
   54 
   55 #define VTOC_FLAG_UNMNT         0x01    /* unmountable partition */
   56 #define VTOC_FLAG_RDONLY        0x10    /* partition is read/only */
   57 
   58 #define VTOC_ASCII_LEN  128
   59 #define VTOC_BOOTSIZE   8192            /* 16 sectors */
   60 #define VTOC_MAGIC      0xdabe
   61 #define VTOC_RAW_PART   2
   62 #define VTOC_SANITY     0x600ddeee
   63 #define VTOC_VERSION    1
   64 #define VTOC_VOLUME_LEN 8
   65 
   66 #define VTOC8_NPARTS    8
   67 
   68 struct vtoc8 {
   69         char            ascii[VTOC_ASCII_LEN];
   70         uint32_t        version;
   71         char            volume[VTOC_VOLUME_LEN];
   72         uint16_t        nparts;
   73         struct {
   74                 uint16_t        tag;
   75                 uint16_t        flag;
   76         } part[VTOC8_NPARTS] __packed;
   77         uint16_t        __alignment;
   78         uint32_t        bootinfo[3];
   79         uint32_t        sanity;
   80         uint32_t        reserved[10];
   81         uint32_t        timestamp[VTOC8_NPARTS];
   82         uint16_t        wskip;
   83         uint16_t        rskip;
   84         char            padding[152];
   85         uint16_t        rpm;
   86         uint16_t        physcyls;
   87         uint16_t        sparesecs;
   88         uint16_t        spare1[2];
   89         uint16_t        interleave;
   90         uint16_t        ncyls;
   91         uint16_t        altcyls;
   92         uint16_t        nheads;
   93         uint16_t        nsecs;
   94         uint16_t        spare2[2];
   95         struct {
   96                 uint32_t        cyl;
   97                 uint32_t        nblks;
   98         } map[VTOC8_NPARTS];
   99         uint16_t        magic;
  100         uint16_t        cksum;
  101 } __packed;
  102 
  103 #ifdef CTASSERT
  104 CTASSERT(sizeof(struct vtoc8) == 512);
  105 #endif
  106 
  107 #endif /* _SYS_VTOC_H_ */

Cache object: 7ae269dfd0a8fc2a0b5b8330808b36f6


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.