summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-11-20 12:42:39 +0000
committerphk <phk@FreeBSD.org>1995-11-20 12:42:39 +0000
commitd0c66446cc835afd7c554f93568beda34a3cbba0 (patch)
tree3c18ee3a32f49eafefcfca9b38f0533552958ab7 /sys/scsi
parent7921cd5a326a4e25ea8f8e1c4da15f46710544e6 (diff)
downloadFreeBSD-src-d0c66446cc835afd7c554f93568beda34a3cbba0.zip
FreeBSD-src-d0c66446cc835afd7c554f93568beda34a3cbba0.tar.gz
Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/cd.c8
-rw-r--r--sys/scsi/ch.c8
-rw-r--r--sys/scsi/od.c8
-rw-r--r--sys/scsi/scsiconf.c20
-rw-r--r--sys/scsi/scsiconf.h4
-rw-r--r--sys/scsi/sd.c8
-rw-r--r--sys/scsi/st.c8
7 files changed, 27 insertions, 37 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index c3fb6ff..f4f31d9 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.43 1995/11/15 03:27:14 asami Exp $
+ * $Id: cd.c,v 1.44 1995/11/19 22:22:18 dyson Exp $
*/
#define SPLCD splbio
@@ -128,11 +128,9 @@ static struct scsi_device cd_switch =
#define CD_EJECT -2
static int
-cd_externalize(struct proc *p, struct kern_devconf *kdc, void *userp,
- size_t len)
+cd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
{
- return scsi_externalize(SCSI_LINK(&cd_switch, kdc->kdc_unit),
- userp, &len);
+ return scsi_externalize(SCSI_LINK(&cd_switch, kdc->kdc_unit), req);
}
static struct kern_devconf kdc_cd_template = {
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index a7c36d9..12045d9 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -2,7 +2,7 @@
* Written by grefen@?????
* Based on scsi drivers by Julian Elischer (julian@tfs.com)
*
- * $Id: ch.c,v 1.20 1995/05/11 19:26:46 rgrimes Exp $
+ * $Id: ch.c,v 1.21 1995/05/30 08:13:22 rgrimes Exp $
*/
#include <sys/types.h>
@@ -95,11 +95,9 @@ struct scsi_device ch_switch =
#define CH_OPEN 0x01
static int
-ch_externalize(struct proc *p, struct kern_devconf *kdc, void *userp,
- size_t len)
+ch_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
{
- return scsi_externalize(SCSI_LINK(&ch_switch, kdc->kdc_unit),
- userp, &len);
+ return scsi_externalize(SCSI_LINK(&ch_switch, kdc->kdc_unit), req);
}
static struct kern_devconf kdc_ch_template = {
diff --git a/sys/scsi/od.c b/sys/scsi/od.c
index e17bfbf..60a8836 100644
--- a/sys/scsi/od.c
+++ b/sys/scsi/od.c
@@ -28,7 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: od.c,v 1.1 1995/10/31 17:25:58 joerg Exp $
+ * $Id: od.c,v 1.2 1995/11/19 22:22:21 dyson Exp $
*/
/*
@@ -136,11 +136,9 @@ struct scsi_device od_switch =
static struct scsi_xfer sx;
static int
-od_externalize(struct proc *p, struct kern_devconf *kdc, void *userp,
- size_t len)
+od_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
{
- return scsi_externalize(SCSI_LINK(&od_switch, kdc->kdc_unit),
- userp, &len);
+ return scsi_externalize(SCSI_LINK(&od_switch, kdc->kdc_unit), req);
}
static struct kern_devconf kdc_od_template = {
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index c364eab..2c510aa 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
- * $Id: scsiconf.c,v 1.35 1995/10/09 15:14:59 joerg Exp $
+ * $Id: scsiconf.c,v 1.36 1995/10/31 17:21:00 joerg Exp $
*/
#include <sys/types.h>
@@ -24,6 +24,7 @@
#include <sys/systm.h>
#include <sys/stat.h>
#include <sys/malloc.h>
+#include <sys/sysctl.h>
#include <sys/devconf.h>
#include <sys/conf.h>
@@ -62,7 +63,6 @@ struct extend_array
void **ps;
};
-static errval scsi_attach_sctarg __P((void));
static void *
extend_alloc(size_t s)
@@ -602,7 +602,8 @@ scsi_bus_conf(sc_link_proto)
"Scbus will be assigned dynamically.\n",
sc_link_proto->adapter->name,
sc_link_proto->adapter_unit,
- sc_link_proto->adapter_bus);
+ sc_link_proto->adapter_bus,
+ sc_link_proto->adapter_bus );
break;
}
}
@@ -683,6 +684,10 @@ scsi_configure_start(void)
scsi_init();
}
+#if NSCTARG > 0
+static errval scsi_attach_sctarg __P((void));
+#endif
+
void
scsi_configure_finish(void)
{
@@ -1421,12 +1426,7 @@ scsi_selectdev(qualifier, type, remov, manu, model, rev)
}
int
-scsi_externalize(struct scsi_link *sl, void *userp, size_t *lenp)
+scsi_externalize(struct scsi_link *sl, struct sysctl_req *req)
{
- if(*lenp < sizeof *sl)
- return ENOMEM;
-
- *lenp -= sizeof *sl;
-
- return copyout(sl, userp, sizeof *sl);
+ return SYSCTL_OUT(req, sl, sizeof *sl);
}
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 74e59c1..a88c80b 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: scsiconf.h,v 1.28 1995/08/23 23:03:34 gibbs Exp $
+ * $Id: scsiconf.h,v 1.29 1995/10/21 23:13:07 phk Exp $
*/
#ifndef SCSI_SCSICONF_H
#define SCSI_SCSICONF_H 1
@@ -465,7 +465,7 @@ void sc_print_addr __P((struct scsi_link *));
void sc_print_start __P((struct scsi_link *));
void sc_print_finish __P((void));
-extern int scsi_externalize __P((struct scsi_link *, void *, size_t *));
+extern int scsi_externalize __P((struct scsi_link *, struct sysctl_req *));
void scsi_device_register __P((struct scsi_device *sd));
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index d8994aa..501aff5 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.70 1995/11/19 22:22:28 dyson Exp $
+ * $Id: sd.c,v 1.71 1995/11/20 02:12:34 davidg Exp $
*/
#define SPLSD splbio
@@ -113,11 +113,9 @@ static struct scsi_device sd_switch =
static struct scsi_xfer sx;
static int
-sd_externalize(struct proc *p, struct kern_devconf *kdc, void *userp,
- size_t len)
+sd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
{
- return scsi_externalize(SCSI_LINK(&sd_switch, kdc->kdc_unit),
- userp, &len);
+ return scsi_externalize(SCSI_LINK(&sd_switch, kdc->kdc_unit), req);
}
static struct kern_devconf kdc_sd_template = {
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index a4cbdb6..c872545 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: st.c,v 1.42 1995/11/04 13:25:23 bde Exp $
+ * $Id: st.c,v 1.43 1995/11/19 22:22:32 dyson Exp $
*/
/*
@@ -285,11 +285,9 @@ static struct scsi_device st_switch =
ST_FM_WRITTEN | ST_2FM_AT_EOD | ST_PER_ACTION)
static int
-st_externalize(struct proc *p, struct kern_devconf *kdc, void *userp,
- size_t len)
+st_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
{
- return scsi_externalize(SCSI_LINK(&st_switch, kdc->kdc_unit),
- userp, &len);
+ return scsi_externalize(SCSI_LINK(&st_switch, kdc->kdc_unit), req);
}
static struct kern_devconf kdc_st_template = {
OpenPOWER on IntegriCloud