]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2image: If there is an error while writing a block, call exit(1)
authorTheodore Ts'o <tytso@mit.edu>
Tue, 1 Jan 2008 15:42:41 +0000 (10:42 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 1 Jan 2008 15:42:41 +0000 (10:42 -0500)
If the disk fills while e2image is writing its output file, it will
spew a large number of error messages instead of exiting with a
non-zero status code after the first failure.

Addresses-Sourceforge-Feature-Request: #606508

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/e2image.c

index b4836eafd4dc978b2c9c05f6a17827753a852e03..f17b7849c898934bc9f147389d7768b51ef09d5f 100644 (file)
@@ -330,6 +330,7 @@ static void write_block(int fd, char *buf, int sparse_offset,
                                err = 0;
                        com_err(program_name, err, "error writing block %u",
                                block);
+                       exit(1);
                }
        }
 }