mdopen.c super0.c super1.c bitmap.c restripe.c sysfs.c
ASSEMBLE_SRCS := mdassemble.c Assemble.c config.c dlink.c util.c super0.c super1.c
-ASSEMBLE_FLAGS:= -DMDASSEMBLE
+ASSEMBLE_FLAGS:= $(CFLAGS) -DMDASSEMBLE
ifdef MDASSEMBLE_AUTO
ASSEMBLE_SRCS += mdopen.c mdstat.c
ASSEMBLE_FLAGS += -DMDASSEMBLE_AUTO
# This doesn't work
mdassemble.klibc : $(ASSEMBLE_SRCS) mdadm.h
rm -f $(OBJS)
- $(KLIBC_GCC) $(CFLAGS) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS)
+ $(KLIBC_GCC) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS)
mdadm.man : mdadm.8
nroff -man mdadm.8 > mdadm.man
#include <errno.h>
#include <string.h>
#include <syslog.h>
-#ifdef __dietlibc__NONO
-int strncmp(const char *s1, const char *s2, size_t n) __THROW __pure__;
-char *strncpy(char *dest, const char *src, size_t n) __THROW;
-#include <strings.h>
+#ifdef __dietlibc__
+#include <strings.h>
#endif
};
#ifndef MDASSEMBLE_AUTO
-/* from mdadm.c */
+/* from mdopen.c */
int open_mddev(char *dev, int autof/*unused */)
{
int mdfd = open(dev, O_RDWR, 0);
int verbose = 0;
int force = 0;
-int main() {
+int main(int argc, char *argv[]) {
mddev_ident_t array_list = conf_get_ident(configfile, NULL);
if (!array_list) {
fprintf(stderr, Name ": No arrays found in config file\n");
NULL, NULL,
readonly, runstop, NULL, NULL, verbose, force);
}
+ return rv;
}
}
int nftw(const char *path, int (*han)(const char *name, const struct stat *stb, int flag, struct FTW *s), int nopenfd, int flags)
{
- ftw(path, add_dev_1, nopenfd);
+ return ftw(path, add_dev_1, nopenfd);
}
#endif