diff options
author | JP Abgrall <jpa@google.com> | 2014-02-15 02:11:33 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-15 02:11:33 +0000 |
commit | 4c003420ce69cb50da94fa1a15a41eb4e2a51c3a (patch) | |
tree | f99ffc63d8852982328acb39e44978948d2855e7 /ext4_utils | |
parent | 39aee3c0ff7c6cde85bdf44e98b06ddc49600e48 (diff) | |
parent | d27ada97706b61c6e302a94bd845b877121556c3 (diff) | |
download | extras-4c003420ce69cb50da94fa1a15a41eb4e2a51c3a.tar.gz |
am d27ada97: Merge "ext4_utils: don\'t leave bad image file in case of error"
* commit 'd27ada97706b61c6e302a94bd845b877121556c3':
ext4_utils: don't leave bad image file in case of error
Diffstat (limited to 'ext4_utils')
-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 7e59417c..91635068 100644 --- a/ext4_utils/make_ext4fs_main.c +++ b/ext4_utils/make_ext4fs_main.c @@ -207,6 +207,7 @@ int main(int argc, char **argv) exitcode = make_ext4fs_internal(fd, directory, mountpoint, fs_config_func, gzip, sparse, crc, wipe, sehnd, verbose, fixed_time); close(fd); - + if (exitcode && strcmp(filename, "-")) + unlink(filename); return exitcode; } |