BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / sys / disklabel.h
index b0f8cfb..bef97fc 100644 (file)
@@ -2,9 +2,35 @@
  * Copyright (c) 1987, 1988 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1987, 1988 Regents of the University of California.
  * All rights reserved.
  *
- * %sccs.include.redist.c%
+ * 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.
  *
  *
- *     @(#)disklabel.h 7.14 (Berkeley) %G%
+ * 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.h 7.19 (Berkeley) 5/7/91
  */
 
 /*
  */
 
 /*
  * to leave room for a bootstrap, etc.
  */
 
  * to leave room for a bootstrap, etc.
  */
 
+/* XXX these should be defined per controller (or drive) elsewhere, not here! */
+#ifdef i386
+#define LABELSECTOR    1                       /* sector containing label */
+#define LABELOFFSET    0                       /* offset of label in sector */
+#endif
+
+#ifndef        LABELSECTOR
 #define LABELSECTOR    0                       /* sector containing label */
 #define LABELSECTOR    0                       /* sector containing label */
+#endif
+
+#ifndef        LABELOFFSET
 #define LABELOFFSET    64                      /* offset of label in sector */
 #define LABELOFFSET    64                      /* offset of label in sector */
+#endif
+
 #define DISKMAGIC      ((u_long) 0x82564557)   /* The disk magic number */
 #ifndef MAXPARTITIONS
 #define        MAXPARTITIONS   8
 #define DISKMAGIC      ((u_long) 0x82564557)   /* The disk magic number */
 #ifndef MAXPARTITIONS
 #define        MAXPARTITIONS   8
@@ -151,7 +189,7 @@ static char *dktypenames[] = {
        "old DEC",
        "SCSI",
        "ESDI",
        "old DEC",
        "SCSI",
        "ESDI",
-       "type 6",
+       "ST506",
        "type 7",
        "type 8",
        "type 9",
        "type 7",
        "type 8",
        "type 9",
@@ -174,6 +212,7 @@ static char *dktypenames[] = {
 #define        FS_V71K         5               /* V7 with 1K blocks (4.1, 2.9) */
 #define        FS_V8           6               /* Eighth Edition, 4K blocks */
 #define        FS_BSDFFS       7               /* 4.2BSD fast file system */
 #define        FS_V71K         5               /* V7 with 1K blocks (4.1, 2.9) */
 #define        FS_V8           6               /* Eighth Edition, 4K blocks */
 #define        FS_BSDFFS       7               /* 4.2BSD fast file system */
+#define        FS_MSDOS        8               /* MSDOS file system */
 
 #ifdef DKTYPENAMES
 static char *fstypenames[] = {
 
 #ifdef DKTYPENAMES
 static char *fstypenames[] = {
@@ -185,6 +224,7 @@ static char *fstypenames[] = {
        "4.1BSD",
        "Eighth Edition",
        "4.2BSD",
        "4.1BSD",
        "Eighth Edition",
        "4.2BSD",
+       "MSDOS",
        0
 };
 #define FSMAXTYPES     (sizeof(fstypenames) / sizeof(fstypenames[0]) - 1)
        0
 };
 #define FSMAXTYPES     (sizeof(fstypenames) / sizeof(fstypenames[0]) - 1)
@@ -265,9 +305,11 @@ struct partinfo {
 #endif LOCORE
 
 #if !defined(KERNEL) && !defined(LOCORE)
 #endif LOCORE
 
 #if !defined(KERNEL) && !defined(LOCORE)
-#if __STDC__ || c_plusplus
-extern struct disklabel *getdiskbyname(const char *);
-#else
-extern struct disklabel *getdiskbyname();
-#endif
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+struct disklabel *getdiskbyname __P((const char *));
+__END_DECLS
+
 #endif
 #endif