summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdisklabel.h
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:35 +0100
committerKarel Zak2006-12-07 00:25:35 +0100
commit2b6fc908bc368b540845a313c3b8a867c5ad9a42 (patch)
tree6fad48a239bc90515a5dc4084d6e3c3ee1f41e29 /disk-utils/fdisklabel.h
parentImported from util-linux-2.7.1 tarball. (diff)
downloadkernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.tar.gz
kernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.tar.xz
kernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.zip
Imported from util-linux-2.8 tarball.
Diffstat (limited to 'disk-utils/fdisklabel.h')
-rw-r--r--disk-utils/fdisklabel.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/disk-utils/fdisklabel.h b/disk-utils/fdisklabel.h
index d007b34b2..06435f4d1 100644
--- a/disk-utils/fdisklabel.h
+++ b/disk-utils/fdisklabel.h
@@ -31,6 +31,8 @@
* SUCH DAMAGE.
*/
+#include <linux/types.h> /* for __u32 etc */
+
#ifndef BSD_DISKMAGIC /* perhaps from <linux/genhd.h> */
#define BSD_DISKMAGIC ((__u32) 0x82564557)
#endif
@@ -41,20 +43,19 @@
#define BSD_LINUX_BOOTDIR "/usr/ucb/mdec"
-#if defined (i386)
+#if defined (i386) || defined (sparc)
#define BSD_LABELSECTOR 1
#define BSD_LABELOFFSET 0
-#define BSD_BBSIZE 8192 /* size of boot area, with label */
-#define BSD_SBSIZE 8192 /* max size of fs superblock */
#elif defined (__alpha__)
#define BSD_LABELSECTOR 0
#define BSD_LABELOFFSET 64
-#define BSD_BBSIZE 8192
-#define BSD_SBSIZE 8192
#else
#error unknown architecture
#endif
+#define BSD_BBSIZE 8192 /* size of boot area, with label */
+#define BSD_SBSIZE 8192 /* max size of fs superblock */
+
struct xbsd_disklabel {
__u32 d_magic; /* the magic number */
__s16 d_type; /* drive type */
@@ -210,10 +211,11 @@ static struct systypes xbsd_fstypes[] = {
{BSD_FS_ISO9660,"ISO-9660"},
{BSD_FS_BOOT, "boot"},
{BSD_FS_ADOS, "ADOS"},
- {BSD_FS_HFS, "HFS"}
+ {BSD_FS_HFS, "HFS"},
+ { 0, NULL }
};
+#define BSD_FSMAXTYPES (SIZE(xbsd_fstypes)-1)
-#define BSD_FSMAXTYPES (sizeof(xbsd_fstypes) / sizeof(struct systypes))
#endif
/*