diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-05-20 08:15:04 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-05-20 08:15:04 +0000 |
commit | 004e3ef3a7d955cfa1a0d80231a5d79ec50a559b (patch) | |
tree | 332d6b0eed4660c9256a8f6a0f6df21e320f48c8 /bin/stty | |
parent | 059ec90667c656b99518b0f95e0550ccf8644314 (diff) |
exit and use __progname
Diffstat (limited to 'bin/stty')
-rw-r--r-- | bin/stty/stty.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/stty/stty.c b/bin/stty/stty.c index d4a011e99fc..55c22250461 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stty.c,v 1.7 2000/10/06 02:49:55 aaron Exp $ */ +/* $OpenBSD: stty.c,v 1.8 2001/05/20 08:15:03 mickey Exp $ */ /* $NetBSD: stty.c,v 1.11 1995/03/21 09:11:30 cgd Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)stty.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: stty.c,v 1.7 2000/10/06 02:49:55 aaron Exp $"; +static char rcsid[] = "$OpenBSD: stty.c,v 1.8 2001/05/20 08:15:03 mickey Exp $"; #endif #endif /* not lint */ @@ -154,13 +154,14 @@ args: argc -= optind; err(1, "tcsetattr"); if (i.wset && ioctl(i.fd, TIOCSWINSZ, &i.win) < 0) warn("TIOCSWINSZ"); - exit(0); + return (0); } void usage() { - - (void)fprintf(stderr, "usage: stty [-a|-e|-g] [-f file] [operands]\n"); + extern char *__progname; + fprintf(stderr, "usage: %s [-a|-e|-g] [-f file] [operands]\n", + __progname); exit (1); } |