diff options
| author | Gordon Tetlow <gordon@FreeBSD.org> | 2003-06-29 18:06:05 +0000 |
|---|---|---|
| committer | Gordon Tetlow <gordon@FreeBSD.org> | 2003-06-29 18:06:05 +0000 |
| commit | 1386defade9043c15dac54cbb11f3ff589eb00cc (patch) | |
| tree | d09c1b26fc473875437b5fc1a8bf4b2bba856000 | |
| parent | 63e11eb5e3f103ea4e33ea5880dd735d46d2b22c (diff) | |
Notes
| -rw-r--r-- | include/paths.h | 3 | ||||
| -rw-r--r-- | sbin/mdmfs/mdmfs.c | 10 | ||||
| -rw-r--r-- | sbin/mdmfs/pathnames.h | 9 |
3 files changed, 8 insertions, 14 deletions
diff --git a/include/paths.h b/include/paths.h index 33d47ed9f67a..8b7f6aa868c1 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 0a6b9859bd63..805440734fe7 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 2dfccb1d9809..000000000000 --- 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 */ |
