nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0260-include-grub-bsdlabel.h-Use-enums.patch

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