Merge branch 'master' into devel-3.0

This commit is contained in:
NeilBrown 2009-02-02 11:09:09 +11:00
commit 6c40598f59
6 changed files with 11 additions and 10 deletions

View File

@ -261,8 +261,8 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
unsigned long long dsize = get_component_size(fd);
if (dsize > 0)
printf(" Used Dev Size : %llu%s\n",
dsize,
human_size((long long)dsize<<10));
dsize/2,
human_size((long long)dsize<<9));
else
printf(" Used Dev Size : unknown\n");
} else

View File

@ -122,9 +122,6 @@ mdadm.static : $(OBJS) $(STATICOBJS)
mdadm.tcc : $(SRCS) mdadm.h
$(TCC) -o mdadm.tcc $(SRCS)
dadm.uclibc : $(SRCS) mdadm.h
$(UCLIBC_GCC) -DUCLIBC -DHAVE_STDINT_H -o mdadm.uclibc $(SRCS) $(STATICSRC)
mdadm.klibc : $(SRCS) mdadm.h
rm -f $(OBJS)
gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 $(CFLAGS) $(SRCS)

View File

@ -520,7 +520,8 @@ char Help_grow[] =
" --layout= -p : For a FAULTY array, set/change the error mode.\n"
" --size= -z : Change the active size of devices in an array.\n"
" : This is useful if all devices have been replaced\n"
" : with larger devices.\n"
" : with larger devices. Value is in Kilobytes, or\n"
" : the special word 'max' meaning 'as large as possible'.\n"
" --raid-devices= -n : Change the number of active devices in an array.\n"
" --bitmap= -b : Add or remove a write-intent bitmap.\n"
" --backup-file= file : A file on a differt device to store data for a\n"

View File

@ -163,7 +163,7 @@ bitmap_info_t *bitmap_fd_read(int fd, int brief)
sb_le_to_cpu(&info->sb); /* convert superblock to CPU byte ordering */
if (brief || info->sb.sync_size == 0)
if (brief || info->sb.sync_size == 0 || info->sb.chunksize == 0)
goto out;
/* read the rest of the file counting total bits and dirty bits --

2
md5.h
View File

@ -27,7 +27,7 @@
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_STDINT_H || _LIBC
#if HAVE_STDINT_H || _LIBC || defined __UCLIBC__
# include <stdint.h>
#endif

View File

@ -662,8 +662,11 @@ struct stat64;
#define HAVE_NFTW we assume
#define HAVE_FTW
#ifdef UCLIBC
#ifdef __UCLIBC__
# include <features.h>
# ifndef __UCLIBC_HAS_LFS__
# define lseek64 lseek
# endif
# ifndef __UCLIBC_HAS_FTW__
# undef HAVE_FTW
# undef HAVE_NFTW
@ -888,7 +891,7 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
va_list ap;
int ret;
va_start(ap, fmt);
ret = asprintf(strp, fmt, ap);
ret = vasprintf(strp, fmt, ap);
va_end(ap);
assert(ret >= 0);
return ret;