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

bool K3bDevice::Device::eject (  )  const

Eject the media.

Returns:
true on success and false on error.
See also:
load()

Definition at line 1497 of file k3bdevice.cpp.

{
  ScsiCommand cmd( this );
  cmd[0] = MMC_START_STOP_UNIT;

  // Since all other eject methods I saw also start the unit before ejecting
  // we do it also although I don't know why...
  cmd[4] = 0x1;      // Start unit
  cmd.transport();

  cmd[4] = 0x2;    // LoEj = 1, Start = 0

  return !cmd.transport();
}


Generated by  Doxygen 1.6.0   Back to index