Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi Put back module_autoload code; the module_aut...



details:   https://anonhg.NetBSD.org/src/rev/fc36320bf28c
branches:  trunk
changeset: 823073:fc36320bf28c
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Apr 11 14:32:43 2017 +0000

description:
Put back module_autoload code; the module_autoload code now checks that
root is mounted.

diffstat:

 sys/dev/scsipi/scsipiconf.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r e24873d42b52 -r fc36320bf28c sys/dev/scsipi/scsipiconf.c
--- a/sys/dev/scsipi/scsipiconf.c       Tue Apr 11 14:31:55 2017 +0000
+++ b/sys/dev/scsipi/scsipiconf.c       Tue Apr 11 14:32:43 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipiconf.c,v 1.43 2017/04/10 21:53:37 jdolecek Exp $ */
+/*     $NetBSD: scsipiconf.c,v 1.44 2017/04/11 14:32:43 christos Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.43 2017/04/10 21:53:37 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.44 2017/04/11 14:32:43 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -72,6 +72,7 @@
 int
 scsipi_print_sense_stub(struct scsipi_xfer * xs, int verbosity)
 {
+       scsipi_load_verbose();
        if (scsi_verbose_loaded)
                return scsipi_print_sense(xs, verbosity);
        else
@@ -81,6 +82,7 @@
 void
 scsipi_print_sense_data_stub(struct scsi_sense_data *sense, int verbosity)
 {
+       scsipi_load_verbose();
        if (scsi_verbose_loaded)
                scsipi_print_sense_data(sense, verbosity);
 }
@@ -108,6 +110,16 @@
        return rc;
 }
 
+/* 
+ * Load the scsiverbose module
+ */   
+void
+scsipi_load_verbose(void)
+{
+       if (scsi_verbose_loaded == 0)
+               module_autoload("scsiverbose", MODULE_CLASS_MISC);
+}
+
 /*
  * allocate and init a scsipi_periph structure for a new device.
  */



Home | Main Index | Thread Index | Old Index