[BACK]Return to mmc.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cdio

Diff for /src/usr.bin/cdio/mmc.c between version 1.11 and 1.12

version 1.11, 2006/06/15 23:49:58 version 1.12, 2006/06/21 21:53:36
Line 217 
Line 217 
                         read(tr->fd, databuf, nblk * tr->blklen);                          read(tr->fd, databuf, nblk * tr->blklen);
                         scr.cmd[8] = nblk;                          scr.cmd[8] = nblk;
                         scr.datalen = nblk * tr->blklen;                          scr.datalen = nblk * tr->blklen;
   again:
                         r = ioctl(fd, SCIOCCOMMAND, &scr);                          r = ioctl(fd, SCIOCCOMMAND, &scr);
                         if (r != 0) {                          if (r != 0) {
                                 warn("ioctl failed while attempting to write");                                  warn("ioctl failed while attempting to write");
                                 return (-1);                                  return (-1);
                           }
                           if (scr.retsts == SCCMD_SENSE && scr.sense[2] == 0x2) {
                                   usleep(1000);
                                   goto again;
                         }                          }
                         if (scr.retsts != SCCMD_OK) {                          if (scr.retsts != SCCMD_OK) {
                                 warnx("ioctl returned bad status while "                                  warnx("ioctl returned bad status while "

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12