Lines Matching refs:fhandle
82 disc->fhandle = open(disc->dev_name, O_RDWR, 0); /* no create */
83 if (disc->fhandle<0) {
88 if (fstat(disc->fhandle, &dstat) < 0) {
101 close(disc->fhandle);
102 disc->fhandle = -1;
127 if (ioctl(disc->fhandle, SCIOCCOMMAND, &req) == -1)
178 error = ioctl(disc->fhandle, SCIOCIDENTIFY, &raddr);
244 disc->fhandle = open(disc->dev_name, O_RDWR | O_NONBLOCK, 0);
245 if (disc->fhandle<0) {
251 flags = fcntl(disc->fhandle, F_GETFL);
253 fcntl(disc->fhandle, F_SETFL, flags);
255 if (fstat(disc->fhandle, &stat) < 0) {
268 close(disc->fhandle);
269 disc->fhandle = -1;
300 error = ioctl(disc->fhandle, SG_IO, &req);
338 ioctl(disc->fhandle, SG_EMULATED_HOST, &emulated);
342 error = ioctl(disc->fhandle, SG_GET_SCSI_ID, &sg_scsi_id);
352 error = ioctl(disc->fhandle, SCSI_IOCTL_GET_IDLUN, &sg_id);
381 disc->fhandle = open(disc->dev_name, O_RDWR | O_NONBLOCK, 0);
382 if (disc->fhandle < 0) {
399 close(disc->fhandle);
400 disc->fhandle = -1;