summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Detail.c4
-rw-r--r--Makefile3
-rw-r--r--ReadMe.c3
-rw-r--r--bitmap.c2
-rw-r--r--md5.h2
-rw-r--r--mdadm.h7
6 files changed, 11 insertions, 10 deletions
diff --git a/Detail.c b/Detail.c
index 9be9cfd..dea605e 100644
--- a/Detail.c
+++ b/Detail.c
@@ -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
diff --git a/Makefile b/Makefile
index 7f27aa4..30f45c7 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/ReadMe.c b/ReadMe.c
index ea4d291..ea977d2 100644
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -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"
diff --git a/bitmap.c b/bitmap.c
index 1810166..b9bbaeb 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -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 --
diff --git a/md5.h b/md5.h
index 1c29e67..145970d 100644
--- a/md5.h
+++ b/md5.h
@@ -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
diff --git a/mdadm.h b/mdadm.h
index 7c8c2f1..5be3aff 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -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;