summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
committerobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
commitc2ee1dcc02035d781d6c70f06df7106979a9f870 (patch)
tree757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /gnu/usr.bin
parentc174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff)
downloadFreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip
FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c5
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c5
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c5
-rw-r--r--gnu/usr.bin/patch/util.c8
4 files changed, 18 insertions, 5 deletions
diff --git a/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c
index 5c28908..6da1a8e 100644
--- a/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c
@@ -19,6 +19,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* $FreeBSD$ */
+
/*
* This works like "remote" but, you use it like this:
* target kcore /dev/mem
@@ -37,6 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <signal.h>
#include <fcntl.h>
#include <kvm.h>
+#include <paths.h>
#include "defs.h"
#include "gdb_string.h"
@@ -110,7 +113,7 @@ initial_pcb()
return (0);
/* If this is NOT /dev/mem try for dumppcb. */
- if (strncmp(core_file, "/dev/", 5)) {
+ if (strncmp(core_file, _PATH_DEV, sizeof _PATH_DEV - 1)) {
sym = lookup_minimal_symbol("dumppcb", NULL, NULL);
if (sym != NULL) {
addr = SYMBOL_VALUE_ADDRESS(sym);
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
index 2608e3c..a08254d 100644
--- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
@@ -17,11 +17,14 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* $FreeBSD$ */
+
#include "defs.h"
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
+#include <paths.h>
#include <sys/sysctl.h>
#include <sys/param.h>
#include <sys/time.h>
@@ -540,7 +543,7 @@ kvm_open (efile, cfile, sfile, perm, errout)
&& stb.st_rdev == makedev (2, 0))
{
devmem = 1;
- kfd = open ("/dev/kmem", perm, 0);
+ kfd = open (_PATH_KMEM, perm, 0);
}
if (lookup_minimal_symbol("mp_ncpus", NULL, NULL)) {
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
index 2608e3c..a08254d 100644
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
@@ -17,11 +17,14 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* $FreeBSD$ */
+
#include "defs.h"
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
+#include <paths.h>
#include <sys/sysctl.h>
#include <sys/param.h>
#include <sys/time.h>
@@ -540,7 +543,7 @@ kvm_open (efile, cfile, sfile, perm, errout)
&& stb.st_rdev == makedev (2, 0))
{
devmem = 1;
- kfd = open ("/dev/kmem", perm, 0);
+ kfd = open (_PATH_KMEM, perm, 0);
}
if (lookup_minimal_symbol("mp_ncpus", NULL, NULL)) {
diff --git a/gnu/usr.bin/patch/util.c b/gnu/usr.bin/patch/util.c
index 258490b..277440c 100644
--- a/gnu/usr.bin/patch/util.c
+++ b/gnu/usr.bin/patch/util.c
@@ -1,3 +1,7 @@
+/* $FreeBSD$ */
+
+#include <paths.h>
+
#include "EXTERN.h"
#include "common.h"
#include "INTERN.h"
@@ -247,7 +251,7 @@ long arg1,arg2,arg3;
write(1, buf, strlen(buf));
r = read(1, buf, sizeof buf);
}
- else if ((ttyfd = open("/dev/tty", 2)) >= 0 && isatty(ttyfd)) {
+ else if ((ttyfd = open(_PATH_TTY, 2)) >= 0 && isatty(ttyfd)) {
/* might be deleted or unwriteable */
write(ttyfd, buf, strlen(buf));
r = read(ttyfd, buf, sizeof buf);
@@ -382,7 +386,7 @@ int assume_exists;
if (debug & 128)
say4("fetchname %s %d %d\n",at,strip_leading,assume_exists);
#endif
- if (strnEQ(at, "/dev/null", 9)) /* so files can be created by diffing */
+ if (strnEQ(at, _PATH_DEVNULL, sizeof _PATH_DEVNULL - 1)) /* so files can be created by diffing */
return Nullch; /* against /dev/null. */
name = fullname = t = savestr(at);
OpenPOWER on IntegriCloud