]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Compile fixes for mdassemble
authorNeilBrown <neilb@suse.de>
Tue, 20 Oct 2009 05:53:43 +0000 (16:53 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 20 Oct 2009 05:53:43 +0000 (16:53 +1100)
Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c
util.c

index 8423a8182bbb5fe2e35ed694e04057e6a5640b6a..28de83e0a0bc8203b81d9ba8a908129ca759458f 100644 (file)
@@ -1104,10 +1104,12 @@ int Assemble(struct supertype *st, char *mddev,
                         * it read-only and let the grow code make it writable.
                         */
                        int rv;
+#ifndef MDASSEMBLE
                        if (content->reshape_active &&
                            content->delta_disks <= 0)
                                rv = Grow_continue(mdfd, st, content, backup_file);
                        else
+#endif
                                rv = ioctl(mdfd, RUN_ARRAY, NULL);
                        if (rv == 0) {
                                if (verbose >= 0) {
diff --git a/util.c b/util.c
index f646bb9284bf16516d3841386298b85e1dda5482..662061b0b29fd61dcf7e5b3041e3d4a8c7a33938 100644 (file)
--- a/util.c
+++ b/util.c
@@ -149,6 +149,7 @@ int get_linux_version()
        return (a*1000000)+(b*1000)+c;
 }
 
+#ifndef MDASSEMBLE
 long long parse_size(char *size)
 {
        /* parse 'size' which should be a number optionally
@@ -213,6 +214,7 @@ int parse_layout_faulty(char *layout)
 
        return mode | (atoi(layout+ln)<< ModeShift);
 }
+#endif
 
 void remove_partitions(int fd)
 {