diff options
author | JP Abgrall <jpa@google.com> | 2014-02-15 01:59:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-15 01:59:51 +0000 |
commit | d27ada97706b61c6e302a94bd845b877121556c3 (patch) | |
tree | b3ca19cd702261470d78749cef908b78723b34c8 | |
parent | c0f813afc35c1ca497f35b46181b37c9b837726e (diff) | |
parent | 39ef30bb574a41bba898dd924e081b678365accc (diff) | |
download | extras-d27ada97706b61c6e302a94bd845b877121556c3.tar.gz |
Merge "ext4_utils: don't leave bad image file in case of error"
-rw-r--r-- | ext4_utils/make_ext4fs_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c index b6c740d2..754e51f0 100644 --- a/ext4_utils/make_ext4fs_main.c +++ b/ext4_utils/make_ext4fs_main.c @@ -203,6 +203,7 @@ int main(int argc, char **argv) exitcode = make_ext4fs_internal(fd, directory, mountpoint, fs_config_func, gzip, sparse, crc, wipe, sehnd, verbose); close(fd); - + if (exitcode && strcmp(filename, "-")) + unlink(filename); return exitcode; } |