Lines Matching refs:fd

105 int		status, size, fd;
116 if ((fd = g_object_open(path, O_NDELAY | O_RDWR)) == -1)
124 (void) close(fd);
128 if (status = g_scsi_mode_sense_cmd(fd, *pg_buf, size,
130 (void) close(fd);
139 (void) close(fd);
143 if (status = g_scsi_mode_sense_cmd(fd, *pg_buf, size,
145 (void) close(fd);
149 (void) close(fd);
526 int err, write, fd, front_index, rear_index, offset;
597 if ((fd = g_object_open(ses_path, O_NDELAY | O_RDWR)) == -1) {
603 if (err = l_get_envsen_page(fd, page_buf, MAX_REC_DIAG_LENGTH,
606 (void) close(fd);
616 (void) close(fd);
721 if (err = g_scsi_send_diag_cmd(fd,
723 (void) close(fd);
730 if (err = l_get_envsen_page(fd, page_buf, MAX_REC_DIAG_LENGTH,
733 (void) close(fd);
748 (void) close(fd);
1188 int fd, status, err;
1195 if ((fd = g_object_open(path_phys, O_NDELAY | O_RDONLY)) == -1) {
1199 if (status = g_scsi_inquiry_cmd(fd,
1201 (void) close(fd);
1208 (void) close(fd);
1219 if (err = l_get_envsen_page(fd, page_buf, MAX_REC_DIAG_LENGTH,
1221 (void) close(fd);
1230 (void) close(fd);
1237 (void) close(fd);
1284 if (err = g_scsi_send_diag_cmd(fd,
1286 (void) close(fd);
1290 (void) close(fd);
1316 int fd, status;
1321 if ((fd = g_object_open(path_phys, O_NDELAY | O_RDONLY)) == -1) {
1325 if (status = g_scsi_inquiry_cmd(fd,
1327 (void) close(fd);
1334 (void) close(fd);
1348 if (status = g_scsi_send_diag_cmd(fd, (uchar_t *)&page4,
1350 (void) close(fd);
1354 (void) close(fd);
1375 int fd, status;
1384 if ((fd = g_object_open(path_phys, O_NDELAY | O_RDONLY)) == -1) {
1388 if (status = g_scsi_inquiry_cmd(fd,
1390 (void) close(fd);
1397 (void) close(fd);
1407 if (status = g_scsi_send_diag_cmd(fd, (uchar_t *)&page4,
1409 (void) close(fd);
1416 if (status = g_scsi_inquiry_cmd(fd,
1418 (void) close(fd);
1423 (void) close(fd);
1429 (void) close(fd);
1482 int fd, status;
1541 if ((fd = g_object_open(result, O_NDELAY | O_RDONLY)) == -1) {
1546 if (status = g_scsi_inquiry_cmd(fd,
1548 (void) close(fd);
1561 if ((status = l_get_envsen_page(fd, (uchar_t *)&page1,
1563 (void) close(fd);
1576 (void) close(fd);
1634 (void) close(fd);
1644 (void) close(fd);
2303 l_get_envsen_page(int fd, uchar_t *buf, int buf_size, uchar_t page_code,
2320 if (status = g_scsi_rec_diag_cmd(fd, (uchar_t *)&hdr,
2349 if (status = g_scsi_rec_diag_cmd(fd, pg, size, page_code)) {
2375 int fd, rval;
2387 if ((fd = g_object_open(path_phys, O_NDELAY | O_RDONLY)) == -1)
2398 if ((rval = l_get_envsen_page(fd, local_buf_ptr,
2400 (void) close(fd);
2447 if ((rval = l_get_envsen_page(fd, local_buf_ptr,
2449 (void) close(fd);
2456 (void) close(fd);
2664 l_persistent_check(int fd, struct l_disk_state_struct *l_disk_state,
2672 if ((status = g_scsi_persistent_reserve_in_cmd(fd,
2686 if ((status = g_scsi_persistent_reserve_in_cmd(fd,
2731 int fd, status = 0, local_state = 0;
2742 if ((fd = g_object_open(path, O_RDONLY)) == -1) {
2743 if ((fd = g_object_open(path,
2750 if (status = g_scsi_tur(fd)) {
2771 } else if (ioctl(fd, DKIOCGVTOC, &vtoc) == 0) {
2796 if (status = g_scsi_read_capacity_cmd(fd, (uchar_t *)&capacity,
2815 (void) close(fd);
2825 (void) close(fd);
4086 check_file(int fd, int verbose, uchar_t **buf_ptr, int dl_info_offset)
4097 if (lseek(fd, 0, SEEK_SET) == -1)
4099 if ((temp = read(fd, (char *)&the_exec, sizeof (the_exec))) == -1) {
4113 if ((temp = read(fd, buf, PROMSIZE)) == -1) {
4176 check_dpm_file(int fd)
4186 if (fd < 0) {
4189 lseek(fd, 0, SEEK_SET);
4193 nread = read(fd, (void *)&theRec, 4);
4207 nread = read(fd, (void *)&theRec.data[0], ((reclen*2) +1));
4219 nread = read(fd, (void *)&theRec, 4);
4233 nread = read(fd, (void *)&theRec.data[0], ((reclen*2) +1));
4242 lseek(fd, 0, SEEK_SET);
4274 ib_download_code_cmd(int fd, int promid, int off, uchar_t *buf_ptr,
4282 status = g_scsi_writebuffer_cmd(fd, off, buf_ptr, sz,
4299 * fd - int for the file descriptor
4309 dak_download_code_cmd(int fd, uchar_t *buf_ptr, int buf_len)
4318 status = g_scsi_writebuffer_cmd(fd, offs, buf_ptr, sz, 0x07, 0);
4571 int fd, status;
4577 if ((fd = g_object_open(path_phys, O_NDELAY | O_RDONLY)) == -1) {
4581 if (status = g_scsi_inquiry_cmd(fd,
4583 (void) close(fd);
4590 (void) close(fd);
4599 close(fd);
4604 if (status = g_scsi_send_diag_cmd(fd, (uchar_t *)&page4,
4606 (void) close(fd);
4614 if (status = g_scsi_rec_diag_cmd(fd, (uchar_t *)&page4,
4616 (void) close(fd);
4620 (void) close(fd);
4624 (void) close(fd);
4648 int j, al_pa, al_pa1, box_id, fd, disk_flag = 0;
4813 if ((fd = g_object_open(ses_path, O_NDELAY | O_RDONLY)) == -1) {
4834 close(fd);