Logo Search packages:      
Sourcecode: k9copy version File versions  Download package

int K3bDevice::Device::readBufferCapacity ( long long &  bufferLength,
long long &  bufferAvail 
) const

MMC command Read Buffer Capacity

Returns:
See also:
K3bScsiCommand::transport()

Definition at line 824 of file k3bdevice_mmc.cpp.

{
  unsigned char data[12];
  ::memset( data, 0, 12 );

  ScsiCommand cmd( this );
  cmd[0] = MMC_READ_BUFFER_CAPACITY;
  cmd[8] = 12;
  int r = cmd.transport( TR_DIR_READ, data, 12 );
  if( r )
    return r;

  int dataLength = from2Byte( data );

  if( dataLength >= 10 ) {
    bufferLength = from4Byte( &data[4] );
    bufferAvail = from4Byte( &data[8] );
  }
  else {
    bufferAvail = bufferLength = 0;
  }

  return 0;
}


Generated by  Doxygen 1.6.0   Back to index