Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev Pull up following revision(s) (requested by mlels...



details:   https://anonhg.NetBSD.org/src/rev/439910cffb59
branches:  netbsd-9
changeset: 744719:439910cffb59
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Feb 11 08:37:34 2020 +0000

description:
Pull up following revision(s) (requested by mlelstv in ticket #694):

        sys/dev/ld.c: revision 1.108

Reject open when attach didn't complete successfully.

diffstat:

 sys/dev/ld.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r b26f9bb1f17a -r 439910cffb59 sys/dev/ld.c
--- a/sys/dev/ld.c      Mon Feb 10 21:40:19 2020 +0000
+++ b/sys/dev/ld.c      Tue Feb 11 08:37:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld.c,v 1.106 2019/03/19 07:01:14 mlelstv Exp $ */
+/*     $NetBSD: ld.c,v 1.106.4.1 2020/02/11 08:37:34 martin Exp $      */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.106 2019/03/19 07:01:14 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.106.4.1 2020/02/11 08:37:34 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -290,6 +290,10 @@
        unit = DISKUNIT(dev);
        if ((sc = device_lookup_private(&ld_cd, unit)) == NULL)
                return (ENXIO);
+
+       if ((sc->sc_flags & LDF_ENABLED) == 0)
+               return (ENODEV);
+
        dksc = &sc->sc_dksc;
 
        return dk_open(dksc, dev, flags, fmt, l);



Home | Main Index | Thread Index | Old Index