diff options
author | charnier <charnier@FreeBSD.org> | 1997-08-18 07:27:59 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-08-18 07:27:59 +0000 |
commit | 546d7b7b78b61935341e8d0e4039503b12da73de (patch) | |
tree | a9441a6133584383dc83e7fac95eb34b3966a993 /usr.bin/tset/map.c | |
parent | 188deefee801bb0ba77a60dc42ecb1cb08fe4871 (diff) | |
download | FreeBSD-src-546d7b7b78b61935341e8d0e4039503b12da73de.zip FreeBSD-src-546d7b7b78b61935341e8d0e4039503b12da73de.tar.gz |
Use err(3) insteadof local redefinition. Sync usage string with man page.
Diffstat (limited to 'usr.bin/tset/map.c')
-rw-r--r-- | usr.bin/tset/map.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/tset/map.c b/usr.bin/tset/map.c index 2e71d2c..cee4b66 100644 --- a/usr.bin/tset/map.c +++ b/usr.bin/tset/map.c @@ -32,14 +32,18 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/9/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/types.h> -#include <termios.h> -#include <errno.h> +#include <err.h> #include <stdlib.h> #include <string.h> +#include <termios.h> #include "extern.h" extern speed_t Ospeed; @@ -78,7 +82,7 @@ add_mapping(port, arg) copy = strdup(arg); mapp = malloc((u_int)sizeof(MAP)); if (copy == NULL || mapp == NULL) - err("%s", strerror(errno)); + errx(1, "malloc"); mapp->next = NULL; if (maplist == NULL) cur = maplist = mapp; @@ -154,7 +158,7 @@ next: if (*arg == ':') { /* If user specified a port with an option flag, set it. */ done: if (port) { if (mapp->porttype) -badmopt: err("illegal -m option format: %s", copy); +badmopt: errx(1, "illegal -m option format: %s", copy); mapp->porttype = port; } @@ -247,6 +251,6 @@ baudrate(rate) return (sp->speed); speed = atol(rate); if (speed == 0) - err("unknown baud rate %s", rate); + errx(1, "unknown baud rate %s", rate); return speed; } |