Ticket #91: freebsd_powercheck.patch

File freebsd_powercheck.patch, 639 bytes (added by bdheller, 14 years ago)
  • os_freebsd.cpp

     
    317317
    318318  // ata_28bit_cmd
    319319  ccb.ataio.cmd.flags = 0;
     320  if (request->flags & ATA_CMD_CONTROL) {
     321    ccb.ataio.cmd.flags |= CAM_ATAIO_NEEDRESULT;
     322  }
    320323  ccb.ataio.cmd.command = request->u.ata.command;
    321324  ccb.ataio.cmd.features = request->u.ata.feature;
    322325  ccb.ataio.cmd.lba_low = request->u.ata.lba;
     
    331334    err(1, "cam_send_ccb");
    332335    return -1;
    333336  }
    334 
     337 
     338  request->u.ata.count = ccb.ataio.res.sector_count;
     339 
    335340  if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)
    336341    return 0;
    337342