]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: (bsd) clean up header file
authorKarel Zak <kzak@redhat.com>
Wed, 26 Jun 2013 11:18:50 +0000 (13:18 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:47:05 +0000 (16:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdiskbsdlabel.c
fdisks/fdiskbsdlabel.h

index 64d266270a08f88c2652457291d7a10d61917d01..8e833c92ce045d656bf7c89f1e95fe0d1f858df6 100644 (file)
 #include "fdisk.h"
 #include "pt-mbr.h"
 
-#define DKTYPENAMES
 #include "fdiskbsdlabel.h"
 #include "all-io.h"
 
+static char *xbsd_dktypenames[] = {
+       "unknown",
+       "SMD",
+       "MSCP",
+       "old DEC",
+       "SCSI",
+       "ESDI",
+       "ST506",
+       "HP-IB",
+       "HP-FL",
+       "type 9",
+       "floppy",
+       0
+};
+#define BSD_DKMAXTYPES (ARRAY_SIZE(xbsd_dktypenames) - 1)
+
+static struct fdisk_parttype xbsd_fstypes[] = {
+        {BSD_FS_UNUSED, "unused"},
+       {BSD_FS_SWAP,   "swap"},
+       {BSD_FS_V6,     "Version 6"},
+       {BSD_FS_V7,     "Version 7"},
+       {BSD_FS_SYSV,   "System V"},
+       {BSD_FS_V71K,   "4.1BSD"},
+       {BSD_FS_V8,     "Eighth Edition"},
+       {BSD_FS_BSDFFS, "4.2BSD"},
+#ifdef __alpha__
+       {BSD_FS_EXT2,   "ext2"},
+#else
+       {BSD_FS_MSDOS,  "MS-DOS"},
+#endif
+       {BSD_FS_BSDLFS, "4.4LFS"},
+       {BSD_FS_OTHER,  "unknown"},
+       {BSD_FS_HPFS,   "HPFS"},
+       {BSD_FS_ISO9660,"ISO-9660"},
+       {BSD_FS_BOOT,   "boot"},
+       {BSD_FS_ADOS,   "ADOS"},
+       {BSD_FS_HFS,    "HFS"},
+       {BSD_FS_ADVFS,  "AdvFS"},
+       { 0, NULL }
+};
+#define BSD_FSMAXTYPES (ARRAY_SIZE(xbsd_fstypes)-1)
+
 /*
  * in-memory fdisk BSD stuff
  */
index d9e76d9469295d474f106067478da27d6f77b6c2..1ba7d92e3f55e264c4310bf19cf015b12a85cba8 100644 (file)
 #include <stdint.h>
 #include "pt-bsd.h"
 
-#ifdef DKTYPENAMES
-static char *xbsd_dktypenames[] = {
-       "unknown",
-       "SMD",
-       "MSCP",
-       "old DEC",
-       "SCSI",
-       "ESDI",
-       "ST506",
-       "HP-IB",
-       "HP-FL",
-       "type 9",
-       "floppy",
-       0
-};
-#define BSD_DKMAXTYPES (sizeof(xbsd_dktypenames) / sizeof(xbsd_dktypenames[0]) - 1)
-#endif
-
-#ifdef DKTYPENAMES
-static struct fdisk_parttype xbsd_fstypes[] = {
-        {BSD_FS_UNUSED, "unused"},
-       {BSD_FS_SWAP,   "swap"},
-       {BSD_FS_V6,     "Version 6"},
-       {BSD_FS_V7,     "Version 7"},
-       {BSD_FS_SYSV,   "System V"},
-       {BSD_FS_V71K,   "4.1BSD"},
-       {BSD_FS_V8,     "Eighth Edition"},
-       {BSD_FS_BSDFFS, "4.2BSD"},
-#ifdef __alpha__
-       {BSD_FS_EXT2,   "ext2"},
-#else
-       {BSD_FS_MSDOS,  "MS-DOS"},
-#endif
-       {BSD_FS_BSDLFS, "4.4LFS"},
-       {BSD_FS_OTHER,  "unknown"},
-       {BSD_FS_HPFS,   "HPFS"},
-       {BSD_FS_ISO9660,"ISO-9660"},
-       {BSD_FS_BOOT,   "boot"},
-       {BSD_FS_ADOS,   "ADOS"},
-       {BSD_FS_HFS,    "HFS"},
-       {BSD_FS_ADVFS,  "AdvFS"},
-       { 0, NULL }
-};
-#define BSD_FSMAXTYPES (ARRAY_SIZE(xbsd_fstypes)-1)
-
-#endif
-
-
 extern void bsd_command_prompt(struct fdisk_context *cxt);
 extern int btrydev(struct fdisk_context *cxt);
 extern void xbsd_print_disklabel(struct fdisk_context *cxt, int);