Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Let backend provide a disk type. The information can...



details:   https://anonhg.NetBSD.org/src/rev/e328f45bb21d
branches:  trunk
changeset: 449740:e328f45bb21d
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Tue Mar 19 07:01:14 2019 +0000

description:
Let backend provide a disk type. The information can be queried through
drvctl(4).

diffstat:

 sys/dev/ld.c    |  6 +++---
 sys/dev/ldvar.h |  3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 967a5ef3f1db -r e328f45bb21d sys/dev/ld.c
--- a/sys/dev/ld.c      Tue Mar 19 06:59:40 2019 +0000
+++ b/sys/dev/ld.c      Tue Mar 19 07:01:14 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld.c,v 1.105 2018/10/13 14:24:35 mlelstv Exp $ */
+/*     $NetBSD: ld.c,v 1.106 2019/03/19 07:01:14 mlelstv 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.105 2018/10/13 14:24:35 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.106 2019/03/19 07:01:14 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -587,7 +587,7 @@
        dg->dg_ntracks = sc->sc_nheads;
        dg->dg_ncylinders = sc->sc_ncylinders;
 
-       disk_set_info(dksc->sc_dev, &dksc->sc_dkdev, NULL);
+       disk_set_info(dksc->sc_dev, &dksc->sc_dkdev, sc->sc_typename);
 }
 
 static void
diff -r 967a5ef3f1db -r e328f45bb21d sys/dev/ldvar.h
--- a/sys/dev/ldvar.h   Tue Mar 19 06:59:40 2019 +0000
+++ b/sys/dev/ldvar.h   Tue Mar 19 07:01:14 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ldvar.h,v 1.32 2017/08/20 15:58:43 mlelstv Exp $       */
+/*     $NetBSD: ldvar.h,v 1.33 2019/03/19 07:01:14 mlelstv Exp $       */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -57,6 +57,7 @@
        int             sc_secsize;     /* sector size in bytes */
        int             sc_maxxfer;     /* max xfer size in bytes */
        int             sc_maxqueuecnt; /* maximum h/w queue depth */
+       char            *sc_typename;   /* inquiry data */
 
        int             (*sc_dump)(struct ld_softc *, void *, int, int);
        int             (*sc_ioctl)(struct ld_softc *, u_long, void *, int32_t, bool);



Home | Main Index | Thread Index | Old Index