next bunch of fixes for bugs found by randconfig

This commit is contained in:
Denis Vlasenko 2006-12-30 18:42:29 +00:00
parent 3bba545a54
commit 6a5dc5d75a
8 changed files with 234 additions and 228 deletions

File diff suppressed because it is too large Load Diff

View File

@ -105,7 +105,7 @@ lib-$(CONFIG_VLOCK) += correct_password.o
lib-$(CONFIG_SU) += correct_password.o
lib-$(CONFIG_LOGIN) += correct_password.o
lib-$(CONFIG_DF) += find_mount_point.o
lib-$(CONFIG_EJECT) += find_mount_point.o
lib-$(CONFIG_MKFS_MINIX) += find_mount_point.o
# We shouldn't build xregcomp.c if we don't need it - this ensures we don't
# require regex.h to be in the include dir even if we don't need it thereby

View File

@ -3859,11 +3859,12 @@ add_ksymoops_symbols(struct obj_file *f, const char *filename,
#if ENABLE_FEATURE_INSMOD_LOAD_MAP
static void print_load_map(struct obj_file *f)
{
struct obj_symbol *sym;
struct obj_symbol **all, **p;
struct obj_section *sec;
#if ENABLE_FEATURE_INSMOD_LOAD_MAP_FULL
struct obj_symbol **all, **p;
int i, nsyms, *loaded;
struct obj_symbol *sym;
#endif
/* Report on the section layout. */
printf("Sections: Size %-*s Align\n",

View File

@ -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 */
}

View File

@ -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

View File

@ -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.

View File

@ -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 */
/* _____________________________________________________________
*/

View File

@ -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)