add pathnames.h
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Apr 1989 06:46:38 +0000 (22:46 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Apr 1989 06:46:38 +0000 (22:46 -0800)
SCCS-vsn: usr.sbin/timed/timed/master.c 2.18
SCCS-vsn: usr.sbin/timed/timed/slave.c 2.20
SCCS-vsn: usr.sbin/timed/timed/timed.c 2.15
SCCS-vsn: usr.sbin/trpt/trpt.c 5.7
SCCS-vsn: usr.sbin/trsp/trsp.c 6.4

usr/src/usr.sbin/timed/timed/master.c
usr/src/usr.sbin/timed/timed/slave.c
usr/src/usr.sbin/timed/timed/timed.c
usr/src/usr.sbin/trpt/trpt.c
usr/src/usr.sbin/trsp/trsp.c

index cabc4bc..906ccb6 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)master.c   2.17 (Berkeley) %G%";
+static char sccsid[] = "@(#)master.c   2.18 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "globals.h"
 #endif /* not lint */
 
 #include "globals.h"
@@ -24,6 +24,7 @@ static char sccsid[] = "@(#)master.c  2.17 (Berkeley) %G%";
 #include <sys/file.h>
 #include <setjmp.h>
 #include <utmp.h>
 #include <sys/file.h>
 #include <setjmp.h>
 #include <utmp.h>
+#include "pathnames.h"
 
 extern int machup;
 extern int measure_delta;
 
 extern int machup;
 extern int measure_delta;
@@ -65,7 +66,7 @@ master()
 
 #ifdef MEASURE
        if (fp == NULL) {
 
 #ifdef MEASURE
        if (fp == NULL) {
-               fp = fopen("/usr/adm/timed.masterlog", "w");
+               fp = fopen(_PATH_MASTERLOG, "w");
                setlinebuf(fp);
        }
 #endif
                setlinebuf(fp);
        }
 #endif
index 3a9decc..4d349b5 100644 (file)
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)slave.c    2.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)slave.c    2.20 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "globals.h"
 #include <protocols/timed.h>
 #include <setjmp.h>
 #endif /* not lint */
 
 #include "globals.h"
 #include <protocols/timed.h>
 #include <setjmp.h>
+#include "pathnames.h"
 
 extern jmp_buf jmpenv;
 
 
 extern jmp_buf jmpenv;
 
@@ -67,7 +68,7 @@ slave()
        if (status & MASTER) {
 #ifdef MEASURE
                if (fp == NULL) {
        if (status & MASTER) {
 #ifdef MEASURE
                if (fp == NULL) {
-                       fp = fopen("/usr/adm/timed.masterlog", "w");
+                       fp = fopen(_PATH_MASTERLOG, "w");
                        setlinebuf(fp);
                }
 #endif
                        setlinebuf(fp);
                }
 #endif
@@ -129,7 +130,7 @@ loop:
                         * (file not open)
                         */
                        if (fp == NULL) {
                         * (file not open)
                         */
                        if (fp == NULL) {
-                               fp = fopen("/usr/adm/timed.masterlog", "w");
+                               fp = fopen(_PATH_MASTERLOG, "w");
                                setlinebuf(fp);
                        }
 #endif
                                setlinebuf(fp);
                        }
 #endif
index f3e9a9f..c5ca2ac 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)timed.c    2.14 (Berkeley) %G%";
+static char sccsid[] = "@(#)timed.c    2.15 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "globals.h"
 #endif /* not lint */
 
 #include "globals.h"
@@ -32,6 +32,7 @@ static char sccsid[] = "@(#)timed.c   2.14 (Berkeley) %G%";
 #include <sys/file.h>
 #include <sys/ioctl.h>
 #include <setjmp.h>
 #include <sys/file.h>
 #include <sys/ioctl.h>
 #include <setjmp.h>
+#include "pathnames.h"
 
 int id;
 int trace;
 
 int id;
 int trace;
@@ -46,7 +47,7 @@ long delay2;
 long random();
 char hostname[MAXHOSTNAMELEN];
 struct host hp[NHOSTS];
 long random();
 char hostname[MAXHOSTNAMELEN];
 struct host hp[NHOSTS];
-char tracefile[] = "/usr/adm/timed.log";
+char tracefile[] = _PATH_TIMEDLOG;
 FILE *fd;
 jmp_buf jmpenv;
 struct netinfo *nettab = NULL;
 FILE *fd;
 jmp_buf jmpenv;
 struct netinfo *nettab = NULL;
index 2557290..e08fb90 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)trpt.c     5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)trpt.c     5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <machine/pte.h>
 #endif /* not lint */
 
 #include <machine/pte.h>
@@ -59,6 +59,7 @@ static char sccsid[] = "@(#)trpt.c    5.6 (Berkeley) %G%";
 #include <stdio.h>
 #include <errno.h>
 #include <nlist.h>
 #include <stdio.h>
 #include <errno.h>
 #include <nlist.h>
+#include "pathnames.h"
 
 struct nlist nl[] = {
 #define        N_TCP_DEBUG     0
 
 struct nlist nl[] = {
 #define        N_TCP_DEBUG     0
@@ -116,13 +117,14 @@ main(argc, argv)
                        break;
                case '?':
                default:
                        break;
                case '?':
                default:
-                       fputs("usage: trpt [-afjst] [-p hex-address] [system [core]]\n", stderr);
+                       (void)fprintf(stderr,
+"usage: trpt [-afjst] [-p hex-address] [system [core]]\n");
                        exit(1);
                }
        argc -= optind;
        argv += optind;
 
                        exit(1);
                }
        argc -= optind;
        argv += optind;
 
-       core = "/dev/kmem";
+       core = _PATH_KMEM;
        if (argc > 0) {
                system = *argv;
                argc--, argv++;
        if (argc > 0) {
                system = *argv;
                argc--, argv++;
@@ -133,7 +135,7 @@ main(argc, argv)
                }
        }
        else
                }
        }
        else
-               system = "/vmunix";
+               system = _PATH_UNIX;
 
        if (nlist(system, nl) < 0 || !nl[0].n_value) {
                fprintf(stderr, "trpt: %s: no namelist\n", system);
 
        if (nlist(system, nl) < 0 || !nl[0].n_value) {
                fprintf(stderr, "trpt: %s: no namelist\n", system);
index c00796f..095384b 100644 (file)
@@ -25,7 +25,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)trsp.c     6.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)trsp.c     6.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -56,6 +56,7 @@ static char sccsid[] = "@(#)trsp.c    6.3 (Berkeley) %G%";
 #include <stdio.h>
 #include <errno.h>
 #include <nlist.h>
 #include <stdio.h>
 #include <errno.h>
 #include <nlist.h>
+#include "pathnames.h"
 
 unsigned long  ntime;
 int    sflag;
 
 unsigned long  ntime;
 int    sflag;
@@ -78,7 +79,10 @@ main(argc, argv)
        char **argv;
 {
        int i, mask = 0, npcbs = 0;
        char **argv;
 {
        int i, mask = 0, npcbs = 0;
-       char *system = "/vmunix", *core = "/dev/kmem";
+       char *system, *core;
+
+       system = _PATH_UNIX;
+       core = _PATH_KMEM;
 
        argc--, argv++;
 again:
 
        argc--, argv++;
 again: