grub2/0259-include-grub-bsdlabel.h-Use-enums.patch
2013-05-02 16:54:52 -04:00

121 lines
4.2 KiB
Diff

From c74a404c260cba6d901b51e9915639966ff1a732 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Fri, 5 Apr 2013 10:33:53 +0200
Subject: [PATCH 259/364] * include/grub/bsdlabel.h: Use enums.
---
ChangeLog | 4 +++
include/grub/bsdlabel.h | 76 ++++++++++++++++++++++++++++---------------------
2 files changed, 48 insertions(+), 32 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3008ff0..37021c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
+ * include/grub/bsdlabel.h: Use enums.
+
+2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
+
Move GRUB_CHAR_BIT to types.h.
2013-04-04 Andrey Borzenkov <arvidjaar@gmail.com>
diff --git a/include/grub/bsdlabel.h b/include/grub/bsdlabel.h
index b10336c..8f241df 100644
--- a/include/grub/bsdlabel.h
+++ b/include/grub/bsdlabel.h
@@ -24,44 +24,56 @@
#define GRUB_PC_PARTITION_BSD_LABEL_MAGIC 0x82564557
/* BSD partition types. */
-#define GRUB_PC_PARTITION_BSD_TYPE_UNUSED 0
-#define GRUB_PC_PARTITION_BSD_TYPE_SWAP 1
-#define GRUB_PC_PARTITION_BSD_TYPE_V6 2
-#define GRUB_PC_PARTITION_BSD_TYPE_V7 3
-#define GRUB_PC_PARTITION_BSD_TYPE_SYSV 4
-#define GRUB_PC_PARTITION_BSD_TYPE_V71K 5
-#define GRUB_PC_PARTITION_BSD_TYPE_V8 6
-#define GRUB_PC_PARTITION_BSD_TYPE_BSDFFS 7
-#define GRUB_PC_PARTITION_BSD_TYPE_MSDOS 8
-#define GRUB_PC_PARTITION_BSD_TYPE_BSDLFS 9
-#define GRUB_PC_PARTITION_BSD_TYPE_OTHER 10
-#define GRUB_PC_PARTITION_BSD_TYPE_HPFS 11
-#define GRUB_PC_PARTITION_BSD_TYPE_ISO9660 12
-#define GRUB_PC_PARTITION_BSD_TYPE_BOOT 13
+enum
+ {
+ GRUB_PC_PARTITION_BSD_TYPE_UNUSED = 0,
+ GRUB_PC_PARTITION_BSD_TYPE_SWAP = 1,
+ GRUB_PC_PARTITION_BSD_TYPE_V6 = 2,
+ GRUB_PC_PARTITION_BSD_TYPE_V7 = 3,
+ GRUB_PC_PARTITION_BSD_TYPE_SYSV = 4,
+ GRUB_PC_PARTITION_BSD_TYPE_V71K = 5,
+ GRUB_PC_PARTITION_BSD_TYPE_V8 = 6,
+ GRUB_PC_PARTITION_BSD_TYPE_BSDFFS = 7,
+ GRUB_PC_PARTITION_BSD_TYPE_MSDOS = 8,
+ GRUB_PC_PARTITION_BSD_TYPE_BSDLFS = 9,
+ GRUB_PC_PARTITION_BSD_TYPE_OTHER = 10,
+ GRUB_PC_PARTITION_BSD_TYPE_HPFS = 11,
+ GRUB_PC_PARTITION_BSD_TYPE_ISO9660 = 12,
+ GRUB_PC_PARTITION_BSD_TYPE_BOOT = 13
+ };
/* FreeBSD-specific types. */
-#define GRUB_PC_PARTITION_FREEBSD_TYPE_VINUM 14
-#define GRUB_PC_PARTITION_FREEBSD_TYPE_RAID 15
-#define GRUB_PC_PARTITION_FREEBSD_TYPE_JFS2 21
+enum
+ {
+ GRUB_PC_PARTITION_FREEBSD_TYPE_VINUM = 14,
+ GRUB_PC_PARTITION_FREEBSD_TYPE_RAID = 15,
+ GRUB_PC_PARTITION_FREEBSD_TYPE_JFS2 = 21
+ };
/* NetBSD-specific types. */
-#define GRUB_PC_PARTITION_NETBSD_TYPE_ADOS 14
-#define GRUB_PC_PARTITION_NETBSD_TYPE_HFS 15
-#define GRUB_PC_PARTITION_NETBSD_TYPE_FILECORE 16
-#define GRUB_PC_PARTITION_NETBSD_TYPE_EXT2FS 17
-#define GRUB_PC_PARTITION_NETBSD_TYPE_NTFS 18
-#define GRUB_PC_PARTITION_NETBSD_TYPE_RAID 19
-#define GRUB_PC_PARTITION_NETBSD_TYPE_CCD 20
-#define GRUB_PC_PARTITION_NETBSD_TYPE_JFS2 21
-#define GRUB_PC_PARTITION_NETBSD_TYPE_APPLEUFS 22
+enum
+ {
+ GRUB_PC_PARTITION_NETBSD_TYPE_ADOS = 14,
+ GRUB_PC_PARTITION_NETBSD_TYPE_HFS = 15,
+ GRUB_PC_PARTITION_NETBSD_TYPE_FILECORE = 16,
+ GRUB_PC_PARTITION_NETBSD_TYPE_EXT2FS = 17,
+ GRUB_PC_PARTITION_NETBSD_TYPE_NTFS = 18,
+ GRUB_PC_PARTITION_NETBSD_TYPE_RAID = 19,
+ GRUB_PC_PARTITION_NETBSD_TYPE_CCD = 20,
+ GRUB_PC_PARTITION_NETBSD_TYPE_JFS2 = 21,
+ GRUB_PC_PARTITION_NETBSD_TYPE_APPLEUFS = 22
+ };
/* OpenBSD-specific types. */
-#define GRUB_PC_PARTITION_OPENBSD_TYPE_ADOS 14
-#define GRUB_PC_PARTITION_OPENBSD_TYPE_HFS 15
-#define GRUB_PC_PARTITION_OPENBSD_TYPE_FILECORE 16
-#define GRUB_PC_PARTITION_OPENBSD_TYPE_EXT2FS 17
-#define GRUB_PC_PARTITION_OPENBSD_TYPE_NTFS 18
-#define GRUB_PC_PARTITION_OPENBSD_TYPE_RAID 19
+enum
+ {
+ GRUB_PC_PARTITION_OPENBSD_TYPE_ADOS = 14,
+ GRUB_PC_PARTITION_OPENBSD_TYPE_HFS = 15,
+ GRUB_PC_PARTITION_OPENBSD_TYPE_FILECORE = 16,
+ GRUB_PC_PARTITION_OPENBSD_TYPE_EXT2FS = 17,
+ GRUB_PC_PARTITION_OPENBSD_TYPE_NTFS = 18,
+ GRUB_PC_PARTITION_OPENBSD_TYPE_RAID = 19
+ };
#define GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION 2
--
1.8.1.4