summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/paths.h3
-rw-r--r--sbin/mdmfs/mdmfs.c10
-rw-r--r--sbin/mdmfs/pathnames.h9
3 files changed, 8 insertions, 14 deletions
diff --git a/include/paths.h b/include/paths.h
index 33d47ed..8b7f6aa 100644
--- a/include/paths.h
+++ b/include/paths.h
@@ -69,7 +69,10 @@
#define _PATH_LOGIN "/usr/bin/login"
#define _PATH_MAILDIR "/var/mail"
#define _PATH_MAN "/usr/share/man"
+#define _PATH_MDCONFIG "/sbin/mdconfig"
#define _PATH_MEM "/dev/mem"
+#define _PATH_MOUNT "/sbin/mount"
+#define _PATH_NEWFS "/sbin/newfs"
#define _PATH_NOLOGIN "/var/run/nologin"
#define _PATH_RCP "/bin/rcp"
#define _PATH_REBOOT "/sbin/reboot"
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index 0a6b985..8054407 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -340,7 +340,7 @@ do_mdconfig_attach(const char *args, const enum md_types mdtype)
default:
abort();
}
- rv = run(NULL, "%s -a %s%s -u %s%d", PATH_MDCONFIG, ta, args,
+ rv = run(NULL, "%s -a %s%s -u %s%d", _PATH_MDCONFIG, ta, args,
mdname, unit);
if (rv)
errx(1, "mdconfig (attach) exited with error code %d", rv);
@@ -373,7 +373,7 @@ do_mdconfig_attach_au(const char *args, const enum md_types mdtype)
default:
abort();
}
- rv = run(&fd, "%s -a %s%s", PATH_MDCONFIG, ta, args);
+ rv = run(&fd, "%s -a %s%s", _PATH_MDCONFIG, ta, args);
if (rv)
errx(1, "mdconfig (attach) exited with error code %d", rv);
@@ -411,7 +411,7 @@ do_mdconfig_detach(void)
{
int rv;
- rv = run(NULL, "%s -d -u %s%d", PATH_MDCONFIG, mdname, unit);
+ rv = run(NULL, "%s -d -u %s%d", _PATH_MDCONFIG, mdname, unit);
if (rv && debug) /* This is allowed to fail. */
warnx("mdconfig (detach) exited with error code %d (ignored)",
rv);
@@ -425,7 +425,7 @@ do_mount(const char *args, const char *mtpoint)
{
int rv;
- rv = run(NULL, "%s%s /dev/%s%d %s", PATH_MOUNT, args,
+ rv = run(NULL, "%s%s /dev/%s%d %s", _PATH_MOUNT, args,
mdname, unit, mtpoint);
if (rv)
errx(1, "mount exited with error code %d", rv);
@@ -475,7 +475,7 @@ do_newfs(const char *args)
{
int rv;
- rv = run(NULL, "%s%s /dev/%s%d", PATH_NEWFS, args, mdname, unit);
+ rv = run(NULL, "%s%s /dev/%s%d", _PATH_NEWFS, args, mdname, unit);
if (rv)
errx(1, "newfs exited with error code %d", rv);
}
diff --git a/sbin/mdmfs/pathnames.h b/sbin/mdmfs/pathnames.h
deleted file mode 100644
index 2dfccb1..0000000
--- a/sbin/mdmfs/pathnames.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* $FreeBSD$ */
-#ifndef MDMFS_PATHNAMES_H
-#define MDMFS_PATHNAMES_H
-
-#define PATH_MDCONFIG "/sbin/mdconfig"
-#define PATH_NEWFS "/sbin/newfs"
-#define PATH_MOUNT "/sbin/mount"
-
-#endif /* !MDMFS_PATHNAMES_H */
OpenPOWER on IntegriCloud