Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src Pull up following revision(s) (requested by manu in ticke...



details:   https://anonhg.NetBSD.org/src/rev/457cc45e4461
branches:  netbsd-8
changeset: 454484:457cc45e4461
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Sep 18 17:22:32 2019 +0000

description:
Pull up following revision(s) (requested by manu in ticket #1381):

        share/man/man8/man8.x86/boot.8: revision 1.18
        sys/kern/kern_subr.c: revision 1.227

Accept root device specification as NAME=label
Document that bootdev option accepts device specification as NAME=label

diffstat:

 share/man/man8/man8.x86/boot.8 |   8 ++++++--
 sys/kern/kern_subr.c           |  19 ++++++++++++-------
 2 files changed, 18 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r 0c32df6f46d3 -r 457cc45e4461 share/man/man8/man8.x86/boot.8
--- a/share/man/man8/man8.x86/boot.8    Wed Sep 18 16:30:33 2019 +0000
+++ b/share/man/man8/man8.x86/boot.8    Wed Sep 18 17:22:32 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: boot.8,v 1.11.4.2 2019/09/17 18:26:53 martin Exp $
+.\"    $NetBSD: boot.8,v 1.11.4.3 2019/09/18 17:22:32 martin Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -436,7 +436,11 @@
 .It Ic bootdev Ns = Ns Ar dev Po or Ic root Ns = Ns Ar dev Pc
 Override the default boot device.
 .Ar dev
-can be a unit name
+is of the form
+.Va NAME=partition_label
+for
+.Xr gpt 8
+partitionned disks. It can also be a unit name
 .Po Dq wd0
 .Pc ,
 or an interface name
diff -r 0c32df6f46d3 -r 457cc45e4461 sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c      Wed Sep 18 16:30:33 2019 +0000
+++ b/sys/kern/kern_subr.c      Wed Sep 18 17:22:32 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_subr.c,v 1.217.10.1 2018/10/13 17:14:13 martin Exp $      */
+/*     $NetBSD: kern_subr.c,v 1.217.10.2 2019/09/18 17:22:32 martin Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.217.10.1 2018/10/13 17:14:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.217.10.2 2019/09/18 17:22:32 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -600,13 +600,18 @@
 static const char *
 getwedgename(const char *name, int namelen)
 {
-       const char *wpfx = "wedge:";
-       const int wpfxlen = strlen(wpfx);
+       const char *wpfx1 = "wedge:";
+       const char *wpfx2 = "NAME=";
+       const int wpfx1len = strlen(wpfx1);
+       const int wpfx2len = strlen(wpfx2);
 
-       if (namelen < wpfxlen || strncmp(name, wpfx, wpfxlen) != 0)
-               return NULL;
+       if (namelen > wpfx1len && strncmp(name, wpfx1, wpfx1len) == 0)
+               return name + wpfx1len;
 
-       return name + wpfxlen;
+       if (namelen > wpfx2len && strncasecmp(name, wpfx2, wpfx2len) == 0)
+               return name + wpfx2len;
+
+       return NULL;
 }
 
 static device_t



Home | Main Index | Thread Index | Old Index