diff options
Diffstat (limited to 'usr.sbin/lpr/common_source')
| -rw-r--r-- | usr.sbin/lpr/common_source/rmjob.c | 4 | ||||
| -rw-r--r-- | usr.sbin/lpr/common_source/startdaemon.c | 23 |
2 files changed, 13 insertions, 14 deletions
diff --git a/usr.sbin/lpr/common_source/rmjob.c b/usr.sbin/lpr/common_source/rmjob.c index c44f1726c361..32e13d4add2d 100644 --- a/usr.sbin/lpr/common_source/rmjob.c +++ b/usr.sbin/lpr/common_source/rmjob.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)rmjob.c 8.2 (Berkeley) 4/28/95"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/param.h> diff --git a/usr.sbin/lpr/common_source/startdaemon.c b/usr.sbin/lpr/common_source/startdaemon.c index ca24c82e35c6..7f990b4d4760 100644 --- a/usr.sbin/lpr/common_source/startdaemon.c +++ b/usr.sbin/lpr/common_source/startdaemon.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)startdaemon.c 8.2 (Berkeley) 4/17/94"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ @@ -41,17 +45,15 @@ static char sccsid[] = "@(#)startdaemon.c 8.2 (Berkeley) 4/17/94"; #include <sys/un.h> #include <dirent.h> -#include <errno.h> +#include <err.h> #include <stdio.h> -#include <unistd.h> #include <string.h> +#include <unistd.h> #include "lp.h" #include "pathnames.h" extern uid_t uid, euid; -static void perr __P((char *)); - /* * Tell the printer daemon that there are new files in the spool directory. */ @@ -66,7 +68,7 @@ startdaemon(printer) s = socket(AF_UNIX, SOCK_STREAM, 0); if (s < 0) { - perr("socket"); + warn("socket"); return(0); } memset(&un, 0, sizeof(un)); @@ -78,7 +80,7 @@ startdaemon(printer) seteuid(euid); if (connect(s, (struct sockaddr *)&un, SUN_LEN(&un)) < 0) { seteuid(uid); - perr("connect"); + warn("connect"); (void) close(s); return(0); } @@ -89,7 +91,7 @@ startdaemon(printer) } n = strlen(buf); if (write(s, buf, n) != n) { - perr("write"); + warn("write"); (void) close(s); return(0); } @@ -105,10 +107,3 @@ startdaemon(printer) (void) close(s); return(0); } - -static void -perr(msg) - char *msg; -{ - (void)printf("%s: %s: %s\n", name, msg, strerror(errno)); -} |
