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

usr/src/sbin/dmesg/dmesg.c

index 2e81088..456a12d 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)dmesg.c    5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)dmesg.c    5.6 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -16,13 +16,14 @@ static char sccsid[] = "@(#)dmesg.c 5.5 (Berkeley) %G%";
  *             print and update incremental history
  */
 
  *             print and update incremental history
  */
 
-#include <stdio.h>
 #include <sys/param.h>
 #include <sys/param.h>
-#include <nlist.h>
-#include <signal.h>
+#include <sys/signal.h>
 #include <sys/file.h>
 #include <sys/vm.h>
 #include <sys/msgbuf.h>
 #include <sys/file.h>
 #include <sys/vm.h>
 #include <sys/msgbuf.h>
+#include <nlist.h>
+#include <stdio.h>
+#include "pathnames.h"
 
 struct msgbuf msgbuf;
 char   *msgbufp;
 
 struct msgbuf msgbuf;
 char   *msgbufp;
@@ -48,17 +49,17 @@ char **argv;
                argv++;
        }
        if (sflg) {
                argv++;
        }
        if (sflg) {
-               of = open("/usr/adm/msgbuf", O_RDWR | O_CREAT, 0644);
+               of = open(_PATH_MSGBUF, O_RDWR | O_CREAT, 0644);
                if (of < 0)
                if (of < 0)
-                       done("Can't open /usr/adm/msgbuf\n");
+                       done("Can't open msgbuf file\n");
                read(of, (char *)&omesg, sizeof(omesg));
                lseek(of, 0L, 0);
        }
        sflg = 0;
                read(of, (char *)&omesg, sizeof(omesg));
                lseek(of, 0L, 0);
        }
        sflg = 0;
-       nlist(argc>2? argv[2]:"/vmunix", nl);
+       nlist(argc>2? argv[2]:_PATH_VMUNIX, nl);
        if (nl[0].n_type==0)
                done("Can't get kernel namelist\n");
        if (nl[0].n_type==0)
                done("Can't get kernel namelist\n");
-       if ((mem = open((argc>1? argv[1]: "/dev/kmem"), 0)) < 0)
+       if ((mem = open((argc>1? argv[1]: _PATH_KMEM), 0)) < 0)
                done("Can't read kernel memory\n");
        lseek(mem, (long)nl[0].n_value, 0);
        read(mem, &msgbuf, sizeof (msgbuf));
                done("Can't read kernel memory\n");
        lseek(mem, (long)nl[0].n_value, 0);
        read(mem, &msgbuf, sizeof (msgbuf));