add pathnames.h
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Apr 1989 03:13:04 +0000 (19:13 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Apr 1989 03:13:04 +0000 (19:13 -0800)
SCCS-vsn: libexec/comsat/comsat.c 5.14

usr/src/libexec/comsat/comsat.c

index c71fc77..8074c4c 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)comsat.c   5.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)comsat.c   5.14 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -42,6 +42,8 @@ static char sccsid[] = "@(#)comsat.c  5.13 (Berkeley) %G%";
 #include <syslog.h>
 #include <strings.h>
 
 #include <syslog.h>
 #include <strings.h>
 
+#include "pathnames.h"
+
 /*
  * comsat
  */
 /*
  * comsat
  */
@@ -73,12 +75,12 @@ main(argc, argv)
                exit(1);
        }
        openlog("comsat", LOG_PID, LOG_DAEMON);
                exit(1);
        }
        openlog("comsat", LOG_PID, LOG_DAEMON);
-       if (chdir("/usr/spool/mail")) {
-               syslog(LOG_ERR, "chdir: /usr/spool/mail");
+       if (chdir(_PATH_MAIL)) {
+               syslog(LOG_ERR, "chdir: %s: %m", _PATH_MAIL);
                exit(1);
        }
                exit(1);
        }
-       if ((uf = open("/etc/utmp", O_RDONLY, 0)) < 0) {
-               syslog(LOG_ERR, ".main: /etc/utmp: %m");
+       if ((uf = open(_PATH_UTMP, O_RDONLY, 0)) < 0) {
+               syslog(LOG_ERR, ".main: %s: %m", _PATH_UTMP);
                (void) recv(0, msgbuf, sizeof (msgbuf) - 1, 0);
                exit(1);
        }
                (void) recv(0, msgbuf, sizeof (msgbuf) - 1, 0);
                exit(1);
        }