Lines Matching +full:cam +full:- +full:if

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 1997-2007 Kenneth D. Merry
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50 #include <cam/cam.h>
51 #include <cam/cam_debug.h>
52 #include <cam/cam_ccb.h>
53 #include <cam/scsi/scsi_all.h>
54 #include <cam/scsi/scsi_da.h>
55 #include <cam/scsi/scsi_pass.h>
56 #include <cam/scsi/scsi_message.h>
57 #include <cam/scsi/smp_all.h>
58 #include <cam/ata/ata_all.h>
73 if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) { in print_periphs()
92 if (ccb.cdm.matches == NULL) { in print_periphs()
106 path_id = -1; /* Make GCC happy. */ in print_periphs()
114 * We do the ioctl multiple times if necessary, in case there are in print_periphs()
118 if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { in print_periphs()
123 if ((ccb.ccb_h.status != CAM_REQ_CMP) in print_periphs()
126 xo_warnx("got CAM error %#x, CDM error %d\n", in print_periphs()
140 if (strcmp(bus_result->dev_name, "iscsi") != 0) { in print_periphs()
145 if ((int)bus_result->unit_number != session_id) { in print_periphs()
146 //printf("wrong unit, %d != %d\n", bus_result->unit_number, session_id); in print_periphs()
154 if (skip_bus != 0) in print_periphs()
166 if (skip_device != 0) in print_periphs()
169 if (strcmp(periph_result->periph_name, "pass") == 0) in print_periphs()
173 xo_emit("{e:lun/%d}", periph_result->target_lun); in print_periphs()
175 periph_result->periph_name, in print_periphs()
176 periph_result->unit_number); in print_periphs()
179 if (have_path_id == 0) { in print_periphs()
180 path_id = periph_result->path_id; in print_periphs()
197 have_path_id ? (int)path_id : -1, 0, have_path_id ? 0 : -1); in print_periphs()