diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-05-27 04:30:59 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-05-27 04:30:59 +0000 |
commit | 7d4928cd755dd602ed0578109ee5fdef56abd51b (patch) | |
tree | 1ffb0769c5341f932e114845f47d07ef935f6aa3 /usr.bin/tar | |
parent | eaef1aa309b8f076ae08583509907fa64b924ef1 (diff) | |
download | FreeBSD-src-7d4928cd755dd602ed0578109ee5fdef56abd51b.zip FreeBSD-src-7d4928cd755dd602ed0578109ee5fdef56abd51b.tar.gz |
Provide framework for exiting with non-zero value on non-critical errors.
Diffstat (limited to 'usr.bin/tar')
-rw-r--r-- | usr.bin/tar/bsdtar.c | 2 | ||||
-rw-r--r-- | usr.bin/tar/bsdtar.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c index cf8eaee..6542fe7 100644 --- a/usr.bin/tar/bsdtar.c +++ b/usr.bin/tar/bsdtar.c @@ -409,7 +409,7 @@ main(int argc, char **argv) free(bsdtar->user_uname); cleanup_exclusions(bsdtar); - return 0; + return (bsdtar->return_value); } /* diff --git a/usr.bin/tar/bsdtar.h b/usr.bin/tar/bsdtar.h index 84f2580..cd63c1d 100644 --- a/usr.bin/tar/bsdtar.h +++ b/usr.bin/tar/bsdtar.h @@ -72,6 +72,8 @@ struct bsdtar { size_t u_width; /* for 'list_item' in read.c */ char *user_uname; /* User running this program */ uid_t user_uid; /* UID running this program */ + int return_value; /* Value returned by main() */ + char warned_lead_slash; /* Already displayed warning */ /* * Data for various subsystems. Full definitions are located in |