Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7-1]: src/sys/dev/scsipi Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/c7b8bd91a810
branches: netbsd-7-1
changeset: 800988:c7b8bd91a810
user: martin <martin%NetBSD.org@localhost>
date: Fri May 31 08:14:50 2019 +0000
description:
Pull up following revision(s) (requested by mlelstv in ticket #1698):
sys/dev/scsipi/scsipi_ioctl.c: revision 1.72 (via patch)
use correct size when copying outgoing sense data.
diffstat:
sys/dev/scsipi/scsipi_ioctl.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 1ebbdf001fae -r c7b8bd91a810 sys/dev/scsipi/scsipi_ioctl.c
--- a/sys/dev/scsipi/scsipi_ioctl.c Wed May 29 15:54:58 2019 +0000
+++ b/sys/dev/scsipi/scsipi_ioctl.c Fri May 31 08:14:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_ioctl.c,v 1.67 2012/04/19 17:45:20 bouyer Exp $ */
+/* $NetBSD: scsipi_ioctl.c,v 1.67.22.1 2019/05/31 08:14:50 martin Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.67 2012/04/19 17:45:20 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.67.22.1 2019/05/31 08:14:50 martin Exp $");
#include "opt_compat_freebsd.h"
#include "opt_compat_netbsd.h"
@@ -162,14 +162,16 @@
SC_DEBUG(periph, SCSIPI_DB3, ("have sense\n"));
screq->senselen_used = min(sizeof(xs->sense.scsi_sense),
SENSEBUFLEN);
- memcpy(screq->sense, &xs->sense.scsi_sense, screq->senselen);
+ memcpy(screq->sense, &xs->sense.scsi_sense,
+ screq->senselen_used);
screq->retsts = SCCMD_SENSE;
break;
case XS_SHORTSENSE:
SC_DEBUG(periph, SCSIPI_DB3, ("have short sense\n"));
screq->senselen_used = min(sizeof(xs->sense.atapi_sense),
SENSEBUFLEN);
- memcpy(screq->sense, &xs->sense.scsi_sense, screq->senselen);
+ memcpy(screq->sense, &xs->sense.atapi_sense,
+ screq->senselen_used);
screq->retsts = SCCMD_UNKNOWN; /* XXX need a shortsense here */
break;
case XS_DRIVER_STUFFUP:
Home |
Main Index |
Thread Index |
Old Index