Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/installboot Support wedge names.
details: https://anonhg.NetBSD.org/src/rev/1c82923e8d79
branches: trunk
changeset: 338704:1c82923e8d79
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Fri Jun 05 05:03:21 2015 +0000
description:
Support wedge names.
diffstat:
usr.sbin/installboot/Makefile | 6 ++++--
usr.sbin/installboot/installboot.c | 16 +++++++++++++---
2 files changed, 17 insertions(+), 5 deletions(-)
diffs (78 lines):
diff -r 6444b828dc1d -r 1c82923e8d79 usr.sbin/installboot/Makefile
--- a/usr.sbin/installboot/Makefile Fri Jun 05 05:02:48 2015 +0000
+++ b/usr.sbin/installboot/Makefile Fri Jun 05 05:03:21 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2014/02/24 07:23:44 skrll Exp $
+# $NetBSD: Makefile,v 1.49 2015/06/05 05:03:21 mlelstv Exp $
#
.include <bsd.own.mk>
@@ -7,7 +7,6 @@
MAN= installboot.8
SRCS= installboot.c sum.c machines.c fstypes.c
-
ARCH_XLAT= amd64-i386.c news68k-news.c newsmips-news.c
ARCH_XLAT+= sun2-sun68k.c sun3-sun68k.c
@@ -49,4 +48,7 @@
.endfor
.endif
+LDADD+= -lutil
+DPADD+= ${LIBUTIL}
+
.include <bsd.prog.mk>
diff -r 6444b828dc1d -r 1c82923e8d79 usr.sbin/installboot/installboot.c
--- a/usr.sbin/installboot/installboot.c Fri Jun 05 05:02:48 2015 +0000
+++ b/usr.sbin/installboot/installboot.c Fri Jun 05 05:03:21 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: installboot.c,v 1.36 2011/11/03 20:46:41 martin Exp $ */
+/* $NetBSD: installboot.c,v 1.37 2015/06/05 05:03:21 mlelstv Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -35,9 +35,10 @@
#include <sys/cdefs.h>
#if !defined(__lint)
-__RCSID("$NetBSD: installboot.c,v 1.36 2011/11/03 20:46:41 martin Exp $");
+__RCSID("$NetBSD: installboot.c,v 1.37 2015/06/05 05:03:21 mlelstv Exp $");
#endif /* !__lint */
+#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
@@ -50,6 +51,7 @@
#include <stddef.h>
#include <string.h>
#include <unistd.h>
+#include <util.h>
#include "installboot.h"
@@ -105,6 +107,9 @@
char *p;
const char *op;
ib_flags unsupported_flags;
+ char specname[MAXPATHLEN];
+ char rawname[MAXPATHLEN];
+ const char *special, *raw;
setprogname(argv[0]);
params = &installboot_params;
@@ -229,7 +234,12 @@
params->stage2 = argv[2];
}
- params->filesystem = argv[0];
+ special = getfsspecname(specname, sizeof(specname), argv[0]);
+ raw = getdiskrawname(rawname, sizeof(rawname), special);
+ if (raw != NULL)
+ special = raw;
+
+ params->filesystem = special;
if (params->flags & IB_NOWRITE) {
op = "only";
mode = O_RDONLY;
Home |
Main Index |
Thread Index |
Old Index