diff options
author | Matthias Kilian <kili@cvs.openbsd.org> | 2008-10-08 12:17:03 +0000 |
---|---|---|
committer | Matthias Kilian <kili@cvs.openbsd.org> | 2008-10-08 12:17:03 +0000 |
commit | fd5b5e72af8ce84860eb6051cb5d24b336144f2c (patch) | |
tree | 2b255af6bf2ab9b3edbe78dcb89c703d7ec1b157 /usr.sbin | |
parent | d4c7b6712f195a8861efb56475b39e7679a6ec60 (diff) |
Correct exit codes for extra files. PR 5072.
Reminded by millert. ok millert, deraaadt
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mtree/mtree.h | 3 | ||||
-rw-r--r-- | usr.sbin/mtree/verify.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/mtree/mtree.h b/usr.sbin/mtree/mtree.h index 7fe3b325ecf..c3a1f519032 100644 --- a/usr.sbin/mtree/mtree.h +++ b/usr.sbin/mtree/mtree.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mtree.h,v 1.11 2005/08/10 00:42:09 millert Exp $ */ +/* $OpenBSD: mtree.h,v 1.12 2008/10/08 12:17:02 kili Exp $ */ /* $NetBSD: mtree.h,v 1.7 1995/03/07 21:26:27 cgd Exp $ */ /*- @@ -41,6 +41,7 @@ #define KEYDEFAULT \ (F_GID | F_MODE | F_NLINK | F_SIZE | F_SLINK | F_TIME | F_UID) +#define ERROREXIT 1 #define MISMATCHEXIT 2 typedef struct _node { diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index d6cac59dd70..4031db79fd4 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.16 2004/11/21 19:36:04 otto Exp $ */ +/* $OpenBSD: verify.c,v 1.17 2008/10/08 12:17:02 kili Exp $ */ /* $NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: verify.c,v 1.16 2004/11/21 19:36:04 otto Exp $"; +static const char rcsid[] = "$OpenBSD: verify.c,v 1.17 2008/10/08 12:17:02 kili Exp $"; #endif #endif /* not lint */ @@ -138,9 +138,11 @@ extra: ? rmdir : unlink)(p->fts_accpath)) { (void)printf(", not removed: %s", strerror(errno)); + rval = ERROREXIT; } else (void)printf(", removed"); - } + } else + rval = MISMATCHEXIT; (void)putchar('\n'); } (void)fts_set(t, p, FTS_SKIP); |