From: Karel Zak Date: Wed, 26 Jun 2013 11:18:50 +0000 (+0200) Subject: fdisk: (bsd) clean up header file X-Git-Tag: v2.24-rc1~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e11858e27340f86c1854ca0aad5341e753d51f0b;p=thirdparty%2Futil-linux.git fdisk: (bsd) clean up header file Signed-off-by: Karel Zak --- diff --git a/fdisks/fdiskbsdlabel.c b/fdisks/fdiskbsdlabel.c index 64d266270a..8e833c92ce 100644 --- a/fdisks/fdiskbsdlabel.c +++ b/fdisks/fdiskbsdlabel.c @@ -58,10 +58,51 @@ #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 */ diff --git a/fdisks/fdiskbsdlabel.h b/fdisks/fdiskbsdlabel.h index d9e76d9469..1ba7d92e3f 100644 --- a/fdisks/fdiskbsdlabel.h +++ b/fdisks/fdiskbsdlabel.h @@ -37,54 +37,6 @@ #include #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);