Module Name: src
Committed By: rin
Date: Tue Jul 2 05:34:09 UTC 2024
Modified Files:
src/sys/arch/prep/stand/boot: sd.c siop.c
Log Message:
prep: stand: for previous, memset and style fix just for sure
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/prep/stand/boot/sd.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/stand/boot/siop.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/prep/stand/boot/sd.c
diff -u src/sys/arch/prep/stand/boot/sd.c:1.5 src/sys/arch/prep/stand/boot/sd.c:1.6
--- src/sys/arch/prep/stand/boot/sd.c:1.5 Tue Jul 2 05:26:40 2024
+++ src/sys/arch/prep/stand/boot/sd.c Tue Jul 2 05:34:08 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.5 2024/07/02 05:26:40 rin Exp $ */
+/* $NetBSD: sd.c,v 1.6 2024/07/02 05:34:08 rin Exp $ */
/*
* Copyright (c) 2010 KIYOHARA Takashi
* All rights reserved.
@@ -593,9 +593,11 @@ sdopen(struct open_file *f, ...)
sd->sc_target = target;
sd->sc_bus = bus;
- error = scsi_inquire(sd, SCSIPI_INQUIRY_LENGTH_SCSI2, inqbuf);
+ memset(&buf, 0, sizeof(buf));
+ error = scsi_inquire(sd, SCSIPI_INQUIRY_LENGTH_SCSI2, &buf);
if (error != 0)
return error;
+ inqbuf = &buf;
sd->sc_type = inqbuf->device & SID_TYPE;
Index: src/sys/arch/prep/stand/boot/siop.c
diff -u src/sys/arch/prep/stand/boot/siop.c:1.9 src/sys/arch/prep/stand/boot/siop.c:1.10
--- src/sys/arch/prep/stand/boot/siop.c:1.9 Tue Jul 2 05:26:40 2024
+++ src/sys/arch/prep/stand/boot/siop.c Tue Jul 2 05:34:08 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: siop.c,v 1.9 2024/07/02 05:26:40 rin Exp $ */
+/* $NetBSD: siop.c,v 1.10 2024/07/02 05:34:08 rin Exp $ */
/*
* Copyright (c) 2010 KIYOHARA Takashi
* All rights reserved.
@@ -1017,13 +1017,15 @@ scsi_probe(struct siop_adapter *adp)
uint8_t device;
char product[sizeof(inqbuf->product) + 1];
+ memset(&buf, 0, sizeof(buf));
+
found = 0;
for (t = 0; t < 8; t++) {
if (t == adp->id)
continue;
for (l = 0; l < 8; l++) {
if (_scsi_inquire(adp, t, l,
- SCSIPI_INQUIRY_LENGTH_SCSI2, inqbuf) != 0)
+ SCSIPI_INQUIRY_LENGTH_SCSI2, &buf) != 0)
continue;
device = inqbuf->device & SID_TYPE;