ctl_util.c (287774) | ctl_util.c (288020) |
---|---|
1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 */ 32/* 33 * CAM Target Layer SCSI library 34 * 35 * Author: Ken Merry <ken@FreeBSD.org> 36 */ 37 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 */ 32/* 33 * CAM Target Layer SCSI library 34 * 35 * Author: Ken Merry <ken@FreeBSD.org> 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_util.c 287774 2015-09-14 08:01:05Z mav $"); | 39__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_util.c 288020 2015-09-20 10:40:30Z mav $"); |
40 41#ifdef _KERNEL 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/types.h> 46#include <sys/malloc.h> 47#else /* __KERNEL__ */ --- 829 unchanged lines hidden (view full) --- 877 char path_str[64]; 878 struct sbuf sb; 879 int i, j, len; 880 881 if (io->io_hdr.io_type != CTL_IO_SCSI) 882 return; 883 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) 884 return; | 40 41#ifdef _KERNEL 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/types.h> 46#include <sys/malloc.h> 47#else /* __KERNEL__ */ --- 829 unchanged lines hidden (view full) --- 877 char path_str[64]; 878 struct sbuf sb; 879 int i, j, len; 880 881 if (io->io_hdr.io_type != CTL_IO_SCSI) 882 return; 883 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) 884 return; |
885 if (io->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) /* XXX: Implement */ | 885 if (io->scsiio.ext_sg_entries > 0) /* XXX: Implement */ |
886 return; 887 ctl_scsi_path_string(io, path_str, sizeof(path_str)); 888 len = min(io->scsiio.kern_data_len, 4096); 889 for (i = 0; i < len; ) { 890 sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); 891 sbuf_cat(&sb, path_str); 892 sbuf_printf(&sb, " %#6x:%04x:", io->scsiio.tag_num, i); 893 for (j = 0; j < 16 && i < len; i++, j++) { --- 27 unchanged lines hidden --- | 886 return; 887 ctl_scsi_path_string(io, path_str, sizeof(path_str)); 888 len = min(io->scsiio.kern_data_len, 4096); 889 for (i = 0; i < len; ) { 890 sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); 891 sbuf_cat(&sb, path_str); 892 sbuf_printf(&sb, " %#6x:%04x:", io->scsiio.tag_num, i); 893 for (j = 0; j < 16 && i < len; i++, j++) { --- 27 unchanged lines hidden --- |