204
219
io_hdr.pack_id = tf_to_lba(tf);
205
220
io_hdr.timeout = (timeout_secs ? timeout_secs : 5) * 1000; /* msecs */
208
223
dump_bytes("outgoing cdb", cdb, sizeof(cdb));
209
228
if (ioctl(fd, SG_IO, &io_hdr) == -1) {
211
230
perror("ioctl(fd,SG_IO)");
212
231
return -1; /* SG_IO not supported */
215
235
fprintf(stderr, "SG_IO: ATA_%u status=0x%x, host_status=0x%x, driver_status=0x%x\n",
216
236
io_hdr.cmd_len, io_hdr.status, io_hdr.host_status, io_hdr.driver_status);