summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Grow.c b/Grow.c
index 13c60288..0515cfa1 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2665,6 +2665,11 @@ int Grow_continue(int mdfd, struct supertype *st, struct mdinfo *info,
bsb.devstart2 = blocks;
backup_fd = open(backup_file, O_RDWR|O_CREAT, S_IRUSR | S_IWUSR);
+ if (backup_fd < 0) {
+ fprintf(stderr, Name ": Cannot open backup file %s\n",
+ backup_file ?: "- no backup-file given");
+ return 1;
+ }
backup_list[0] = backup_fd;
backup_offsets[0] = 8 * 512;
fds = malloc(odisks * sizeof(fds[0]));