diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-30 18:42:29 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-30 18:42:29 +0000 |
commit | 6a5dc5d75a1368464fc7e085aa1f1d4c453d27cd (patch) | |
tree | d270e6fa41ae3b327aaef60a956328961795594a /util-linux | |
parent | 3bba545a54addf59b63a003e7ada03fd8b29b5ba (diff) |
next bunch of fixes for bugs found by randconfig
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fdisk.c | 30 | ||||
-rw-r--r-- | util-linux/fdisk_aix.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk_osf.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk_sgi.c | 6 | ||||
-rw-r--r-- | util-linux/fdisk_sun.c | 6 |
5 files changed, 24 insertions, 22 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 64ebb60e3..27b041e8e 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -257,7 +257,7 @@ set_changed(int i) { ptes[i].changed = 1; } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ static ATTRIBUTE_ALWAYS_INLINE struct partition * get_part_table(int i) @@ -344,7 +344,7 @@ read_hex(const struct systypes *sys) return v; } } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ #include "fdisk_aix.c" @@ -418,7 +418,9 @@ STATIC_SGI int sgi_get_sysid(int i); STATIC_SGI void sgi_delete_partition(int i); STATIC_SGI void sgi_change_sysid(int i, int sys); STATIC_SGI void sgi_list_table(int xtra); +#if ENABLE_FEATURE_FDISK_ADVANCED STATIC_SGI void sgi_set_xcyl(void); +#endif STATIC_SGI int verify_sgi(int verbose); STATIC_SGI void sgi_add_partition(int n, int sys); STATIC_SGI void sgi_set_swappartition(int i); @@ -427,21 +429,21 @@ STATIC_SGI void sgi_set_bootfile(const char* aFile); STATIC_SGI void create_sgiinfo(void); STATIC_SGI void sgi_write_table(void); STATIC_SGI void sgi_set_bootpartition(int i); - #include "fdisk_sgi.c" STATIC_SUN const struct systypes sun_sys_types[]; STATIC_SUN void sun_delete_partition(int i); STATIC_SUN void sun_change_sysid(int i, int sys); STATIC_SUN void sun_list_table(int xtra); -STATIC_SUN void sun_set_xcyl(void); STATIC_SUN void add_sun_partition(int n, int sys); +#if ENABLE_FEATURE_FDISK_ADVANCED STATIC_SUN void sun_set_alt_cyl(void); STATIC_SUN void sun_set_ncyl(int cyl); STATIC_SUN void sun_set_xcyl(void); STATIC_SUN void sun_set_ilfact(void); STATIC_SUN void sun_set_rspeed(void); STATIC_SUN void sun_set_pcylcount(void); +#endif STATIC_SUN void toggle_sunflags(int i, unsigned char mask); STATIC_SUN void verify_sun(void); STATIC_SUN void sun_write_table(void); @@ -564,7 +566,7 @@ store4_little_endian(unsigned char *cp, unsigned val) cp[2] = val >> 16; cp[3] = val >> 24; } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ static unsigned read4_little_endian(const unsigned char *cp) @@ -784,7 +786,7 @@ menu(void) #endif } } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ #if ENABLE_FEATURE_FDISK_ADVANCED @@ -873,7 +875,7 @@ get_sys_types(void) } #else #define get_sys_types() i386_sys_types -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ static const char *partition_type(unsigned char type) { @@ -921,7 +923,7 @@ void list_types(const struct systypes *sys) } while (done < last[0]); putchar('\n'); } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ static int is_cleared_partition(const struct partition *p) @@ -1149,7 +1151,7 @@ create_doslabel(void) set_changed(0); get_boot(create_empty_dos); } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ static void get_sectorsize(void) @@ -1348,7 +1350,7 @@ get_boot(enum action what) #endif if (!valid_part_table_flag(MBRbuffer)) { -#ifndef CONFIG_FEATURE_FDISK_WRITABLE +#if !ENABLE_FEATURE_FDISK_WRITABLE return -1; #else switch (what) { @@ -1374,7 +1376,7 @@ get_boot(enum action what) default: bb_error_msg_and_die(_("internal error")); } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ } #if ENABLE_FEATURE_FDISK_WRITABLE @@ -1769,7 +1771,7 @@ change_sysid(void) } } } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ /* check_consistency() and linear2chs() added Sat Mar 6 12:28:16 1993, @@ -2517,7 +2519,7 @@ reread_partition_table(int leave) exit(i != 0); } } -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ #if ENABLE_FEATURE_FDISK_ADVANCED #define MAX_PER_LINE 16 @@ -3035,5 +3037,5 @@ int fdisk_main(int argc, char **argv) } } return 0; -#endif /* CONFIG_FEATURE_FDISK_WRITABLE */ +#endif /* FEATURE_FDISK_WRITABLE */ } diff --git a/util-linux/fdisk_aix.c b/util-linux/fdisk_aix.c index a3d5fe15f..2402e294a 100644 --- a/util-linux/fdisk_aix.c +++ b/util-linux/fdisk_aix.c @@ -1,4 +1,4 @@ -#ifdef CONFIG_FEATURE_AIX_LABEL +#if ENABLE_FEATURE_AIX_LABEL /* * Copyright (C) Andreas Neuper, Sep 1998. * This file may be redistributed under diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c index 3d654d392..2daafe6c7 100644 --- a/util-linux/fdisk_osf.c +++ b/util-linux/fdisk_osf.c @@ -1,4 +1,4 @@ -#ifdef CONFIG_FEATURE_OSF_LABEL +#if ENABLE_FEATURE_OSF_LABEL /* * Copyright (c) 1987, 1988 Regents of the University of California. * All rights reserved. diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c index 7687103c9..d8acd6bc7 100644 --- a/util-linux/fdisk_sgi.c +++ b/util-linux/fdisk_sgi.c @@ -1,4 +1,4 @@ -#ifdef CONFIG_FEATURE_SGI_LABEL +#if ENABLE_FEATURE_SGI_LABEL /* * Copyright (C) Andreas Neuper, Sep 1998. @@ -751,7 +751,7 @@ sgi_add_partition(int n, int sys) sgi_set_partition(n, first, last-first, sys); } -#ifdef CONFIG_FEATURE_FDISK_ADVANCED +#if ENABLE_FEATURE_FDISK_ADVANCED static void create_sgilabel(void) { @@ -861,7 +861,7 @@ sgi_set_xcyl(void) { /* do nothing in the beginning */ } -#endif /* CONFIG_FEATURE_FDISK_ADVANCED */ +#endif /* FEATURE_FDISK_ADVANCED */ /* _____________________________________________________________ */ diff --git a/util-linux/fdisk_sun.c b/util-linux/fdisk_sun.c index af85fb2c4..a3ca66f68 100644 --- a/util-linux/fdisk_sun.c +++ b/util-linux/fdisk_sun.c @@ -1,4 +1,4 @@ -#ifdef CONFIG_FEATURE_SUN_LABEL +#if ENABLE_FEATURE_SUN_LABEL #define SUN_LABEL_MAGIC 0xDABE #define SUN_LABEL_MAGIC_SWAPPED 0xBEDA @@ -663,7 +663,7 @@ sun_list_table(int xtra) } } -#ifdef CONFIG_FEATURE_FDISK_ADVANCED +#if ENABLE_FEATURE_FDISK_ADVANCED static void sun_set_alt_cyl(void) @@ -710,7 +710,7 @@ sun_set_pcylcount(void) SUN_SSWAP16(read_int(0, SUN_SSWAP16(sunlabel->pcylcount), 65535, 0, _("Number of physical cylinders"))); } -#endif /* CONFIG_FEATURE_FDISK_ADVANCED */ +#endif /* FEATURE_FDISK_ADVANCED */ static void sun_write_table(void) |