IDEDiskDevice.cpp 683 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include "IDEDiskDevice.h"
  2. #include "Disk.h"
  3. RetainPtr<IDEDiskDevice> IDEDiskDevice::create()
  4. {
  5. return adopt(*new IDEDiskDevice);
  6. }
  7. IDEDiskDevice::IDEDiskDevice()
  8. {
  9. }
  10. IDEDiskDevice::~IDEDiskDevice()
  11. {
  12. }
  13. const char* IDEDiskDevice::className() const
  14. {
  15. return "IDEDiskDevice";
  16. }
  17. unsigned IDEDiskDevice::blockSize() const
  18. {
  19. return 512;
  20. }
  21. bool IDEDiskDevice::readBlock(unsigned index, byte* out) const
  22. {
  23. Disk::readSectors(index, 1, out);
  24. return true;
  25. }
  26. bool IDEDiskDevice::writeBlock(unsigned index, const byte* data)
  27. {
  28. (void) index;
  29. (void) data;
  30. kprintf("[IDEDiskDevice] writeBlock not implemented()\n");
  31. notImplemented();
  32. return false;
  33. }