ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit 144a89326822d55c65997a37ea048622ceb96020
parent 7fa098ace67f2089710608f788259931a118acc6
Author: sin <sin@2f30.org>
Date:   Wed Jun  4 13:02:07 +0100

Ensure a proper exit code

If copy() fails at least print stats.

Diffstat:
dd.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dd.c b/dd.c @@ -263,10 +263,10 @@ main(int argc, char *argv[]) signal(SIGINT, sig_int); if (copy(&config) < 0) - eprintf("copy:"); + weprintf("copy:"); print_stat(&config); if (config.nosync == 0) sync(); sync(); - return EXIT_SUCCESS; + return config.saved_errno; }