diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-29 18:05:41 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-29 18:05:41 +0000 |
commit | 58b51bee4ea5d09d8ab85e02a8e0c31acc223bcb (patch) | |
tree | 2ec42df9200e72a252bbb5bba638542051a38331 | |
parent | 318bef9e03cb60ccdd29f61c5d7667655a6433c2 (diff) |
move _PATH_BOOTDIR w/ trailing slash into paths.h for other progs...
disklabel changed to use it that way
-rw-r--r-- | include/paths.h | 3 | ||||
-rw-r--r-- | sbin/disklabel/disklabel.c | 16 | ||||
-rw-r--r-- | sbin/disklabel/pathnames.h | 3 |
3 files changed, 11 insertions, 11 deletions
diff --git a/include/paths.h b/include/paths.h index 96c7462041f..6ba951abb52 100644 --- a/include/paths.h +++ b/include/paths.h @@ -1,4 +1,4 @@ -/* $OpenBSD: paths.h,v 1.8 1997/07/23 06:53:10 millert Exp $ */ +/* $OpenBSD: paths.h,v 1.9 1997/08/29 18:05:38 mickey Exp $ */ /* $NetBSD: paths.h,v 1.7 1994/10/26 00:56:12 cgd Exp $ */ /* @@ -68,6 +68,7 @@ #define _PATH_VI "/usr/bin/vi" /* Provide trailing slash, since mostly used for building pathnames. */ +#define _PATH_BOOTDIR "/usr/mdec/" #define _PATH_DEV "/dev/" #define _PATH_TMP "/tmp/" #define _PATH_VARDB "/var/db/" diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 8593e5545fc..2d2bfb447fc 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.34 1997/07/28 08:26:58 deraadt Exp $ */ +/* $OpenBSD: disklabel.c,v 1.35 1997/08/29 18:05:40 mickey Exp $ */ /* $NetBSD: disklabel.c,v 1.30 1996/03/14 19:49:24 ghudson Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: disklabel.c,v 1.34 1997/07/28 08:26:58 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: disklabel.c,v 1.35 1997/08/29 18:05:40 mickey Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -324,7 +324,7 @@ makelabel(type, name, lp) */ if (!xxboot && lp->d_boot0) { if (*lp->d_boot0 != '/') - (void)sprintf(boot0, "%s/%s", + (void)sprintf(boot0, "%s%s", _PATH_BOOTDIR, lp->d_boot0); else (void)strcpy(boot0, lp->d_boot0); @@ -333,7 +333,7 @@ makelabel(type, name, lp) #if NUMBOOT > 1 if (!bootxx && lp->d_boot1) { if (*lp->d_boot1 != '/') - (void)sprintf(boot1, "%s/%s", + (void)sprintf(boot1, "%s%s", _PATH_BOOTDIR, lp->d_boot1); else (void)strcpy(boot1, lp->d_boot1); @@ -738,23 +738,23 @@ makebootarea(boot, dp, f) *np++ = '\0'; if (!xxboot) { - (void)sprintf(np, "%s/%sboot", + (void)sprintf(np, "%s%sboot", _PATH_BOOTDIR, dkbasename); if (access(np, F_OK) < 0 && dkbasename[0] == 'r') dkbasename++; xxboot = np; - (void)sprintf(xxboot, "%s/%sboot", + (void)sprintf(xxboot, "%s%sboot", _PATH_BOOTDIR, dkbasename); np += strlen(xxboot) + 1; } #if NUMBOOT > 1 if (!bootxx) { - (void)sprintf(np, "%s/boot%s", + (void)sprintf(np, "%sboot%s", _PATH_BOOTDIR, dkbasename); if (access(np, F_OK) < 0 && dkbasename[0] == 'r') dkbasename++; bootxx = np; - (void)sprintf(bootxx, "%s/boot%s", + (void)sprintf(bootxx, "%sboot%s", _PATH_BOOTDIR, dkbasename); np += strlen(bootxx) + 1; } diff --git a/sbin/disklabel/pathnames.h b/sbin/disklabel/pathnames.h index 5c15fbd8377..7e68ea6db07 100644 --- a/sbin/disklabel/pathnames.h +++ b/sbin/disklabel/pathnames.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pathnames.h,v 1.3 1996/09/16 02:21:58 millert Exp $ */ +/* $OpenBSD: pathnames.h,v 1.4 1997/08/29 18:05:40 mickey Exp $ */ /* $NetBSD: pathnames.h,v 1.6 1995/03/18 14:54:43 cgd Exp $ */ /* @@ -38,5 +38,4 @@ #include <paths.h> -#define _PATH_BOOTDIR "/usr/mdec" #define _PATH_TMPFILE "/tmp/EdDk.aXXXXXX" |