diff options
author | Gabe Black <gabeblack@chromium.org> | 2012-01-13 14:24:59 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@chromium.org> | 2012-01-13 19:26:18 -0800 |
commit | bbc467e64948383146c3b230798acb37d9e39929 (patch) | |
tree | 1b38eb2b3cfc1780b8eee791a4cd744878ad349e /disk | |
parent | 4d92b575bb795fb4e48e3b6768e5e627f86eda3f (diff) |
Disk: Make the disk partition code work with no specific partition types
Currently, if the disk partition code is compiled with all of the parition
types compiled out, it hits an #error which stops the build. This change
adjusts that file so that those functions will fall through to their defaults
in those cases instead of breaking the build. These functions are needed
because other code calls them, and that code is needed because other config
options are overly broad and bring in support we don't need along with
support we do.
BUG=chromium-os:25041
BUG=chromium-os:25042
TEST=Built and booted on Lumpy with various options turned on and off,
built for Kaen.
Change-Id: I1307563c0a70a8a011a180ec0457113b54a65095
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/14179
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'disk')
-rw-r--r-- | disk/part.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/disk/part.c b/disk/part.c index f07a17feb8a..c79585f3dda 100644 --- a/disk/part.c +++ b/disk/part.c @@ -248,12 +248,6 @@ void dev_print (block_dev_desc_t *dev_desc) defined(CONFIG_MMC) || \ defined(CONFIG_SYSTEMACE) ) -#if defined(CONFIG_MAC_PARTITION) || \ - defined(CONFIG_DOS_PARTITION) || \ - defined(CONFIG_ISO_PARTITION) || \ - defined(CONFIG_AMIGA_PARTITION) || \ - defined(CONFIG_EFI_PARTITION) - void init_part (block_dev_desc_t * dev_desc) { #ifdef CONFIG_ISO_PARTITION @@ -349,6 +343,12 @@ int get_partition_info (block_dev_desc_t *dev_desc, int part return (-1); } +#if defined(CONFIG_MAC_PARTITION) || \ + defined(CONFIG_DOS_PARTITION) || \ + defined(CONFIG_ISO_PARTITION) || \ + defined(CONFIG_AMIGA_PARTITION) || \ + defined(CONFIG_EFI_PARTITION) + static void print_part_header (const char *type, block_dev_desc_t * dev_desc) { puts ("\nPartition Map for "); @@ -382,6 +382,8 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc) dev_desc->dev, type); } +#endif + void print_part (block_dev_desc_t * dev_desc) { @@ -428,11 +430,4 @@ void print_part (block_dev_desc_t * dev_desc) puts ("## Unknown partition table\n"); } - -#else /* neither MAC nor DOS nor ISO nor AMIGA nor EFI partition configured */ -# error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION -# error nor CONFIG_ISO_PARTITION nor CONFIG_AMIGA_PARTITION -# error nor CONFIG_EFI_PARTITION configured! -#endif - #endif |