scsi_cmds.c (121184) | scsi_cmds.c (124308) |
---|---|
1/* 2 * SCSI Disk Emulator 3 * 4 * Copyright (c) 2002 Nate Lawson. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/* 2 * SCSI Disk Emulator 3 * 4 * Copyright (c) 2002 Nate Lawson. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/share/examples/scsi_target/scsi_cmds.c 121184 2003-10-18 04:54:08Z simokawa $ | 28 * $FreeBSD: head/share/examples/scsi_target/scsi_cmds.c 124308 2004-01-09 19:27:18Z njl $ |
29 */ 30 31#include <stdio.h> 32#include <stddef.h> 33#include <stdarg.h> 34#include <stdlib.h> 35#include <string.h> 36#include <err.h> --- 216 unchanged lines hidden (view full) --- 253 offsetof(struct scsi_sense_data, sense_key_spec[2]) - 254 offsetof(struct scsi_sense_data, extra_len); 255 256 /* Fill out the supplied CTIO */ 257 if (ctio != NULL) { 258 bcopy(sense, &ctio->sense_data, sizeof(*sense)); 259 ctio->sense_len = sizeof(*sense); /* XXX */ 260 ctio->ccb_h.flags &= ~CAM_DIR_MASK; | 29 */ 30 31#include <stdio.h> 32#include <stddef.h> 33#include <stdarg.h> 34#include <stdlib.h> 35#include <string.h> 36#include <err.h> --- 216 unchanged lines hidden (view full) --- 253 offsetof(struct scsi_sense_data, sense_key_spec[2]) - 254 offsetof(struct scsi_sense_data, extra_len); 255 256 /* Fill out the supplied CTIO */ 257 if (ctio != NULL) { 258 bcopy(sense, &ctio->sense_data, sizeof(*sense)); 259 ctio->sense_len = sizeof(*sense); /* XXX */ 260 ctio->ccb_h.flags &= ~CAM_DIR_MASK; |
261 ctio->ccb_h.flags |= CAM_DIR_NONE | /* CAM_SEND_SENSE | */ | 261 ctio->ccb_h.flags |= CAM_DIR_NONE | CAM_SEND_SENSE | |
262 CAM_SEND_STATUS; 263 ctio->dxfer_len = 0; 264 ctio->scsi_status = SCSI_STATUS_CHECK_COND; 265 } 266} 267 268void 269tcmd_ua(u_int init_id, ua_types new_ua) --- 490 unchanged lines hidden --- | 262 CAM_SEND_STATUS; 263 ctio->dxfer_len = 0; 264 ctio->scsi_status = SCSI_STATUS_CHECK_COND; 265 } 266} 267 268void 269tcmd_ua(u_int init_id, ua_types new_ua) --- 490 unchanged lines hidden --- |