summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Grow.c b/Grow.c
index d669a4e..e218eb1 100644
--- a/Grow.c
+++ b/Grow.c
@@ -290,10 +290,15 @@ int Grow_addbitmap(char *devname, int fd, char *file, int chunk, int delay, int
if (fd2 < 0)
continue;
if (st->ss->load_super(st, fd2, &super, NULL)==0) {
- st->ss->add_internal_bitmap(st, super,
+ if (st->ss->add_internal_bitmap(st, super,
chunk, delay, write_behind,
- bitmapsize, 0, major);
- st->ss->write_bitmap(st, fd2, super);
+ bitmapsize, 0, major))
+ st->ss->write_bitmap(st, fd2, super);
+ else {
+ fprintf(stderr, Name ": failed to create internal bitmap - chunksize problem.\n");
+ close(fd2);
+ return 1;
+ }
}
close(fd2);
}