Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/2c37d22e3480
branches:  netbsd-9
changeset: 458351:2c37d22e3480
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Sep 17 19:45:02 2019 +0000

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

        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 236d05420d5f -r 2c37d22e3480 share/man/man8/man8.x86/boot.8
--- a/share/man/man8/man8.x86/boot.8    Tue Sep 17 19:41:45 2019 +0000
+++ b/share/man/man8/man8.x86/boot.8    Tue Sep 17 19:45:02 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: boot.8,v 1.15.2.2 2019/09/17 19:32:00 martin Exp $
+.\"    $NetBSD: boot.8,v 1.15.2.3 2019/09/17 19:45:02 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 236d05420d5f -r 2c37d22e3480 sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c      Tue Sep 17 19:41:45 2019 +0000
+++ b/sys/kern/kern_subr.c      Tue Sep 17 19:45:02 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_subr.c,v 1.223 2019/01/27 02:08:43 pgoyette Exp $ */
+/*     $NetBSD: kern_subr.c,v 1.223.4.1 2019/09/17 19:45:03 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.223 2019/01/27 02:08:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.223.4.1 2019/09/17 19:45:03 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -679,13 +679,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