VSCSI(4) - example /* finish command with a t2i ioctl */ bzero(&t2i, sizeof(t2i)); t2i.tag = i2t.tag; t2i.status = data_status(&t2i.sense, &t2i.senselen); if (ioctl(v.fd, VSCSI_T2I, &t2i) == -1) err(1, "ioctl VSCSI_T2I"); /* detach disk */ devev.target = target; devev.lun = 0;/* we only use one LUN per target */ if (ioctl(fd, VSCSI_REQDETACH, &devev) == -1) err(1, "ioctl VSCSI_REQDETACH");