diff --git a/Storage/Disk/Drive.cpp b/Storage/Disk/Drive.cpp index a08398a47..1911d7916 100644 --- a/Storage/Disk/Drive.cpp +++ b/Storage/Disk/Drive.cpp @@ -46,6 +46,11 @@ bool Drive::get_is_read_only() { return false; } +bool Drive::get_is_ready() { + // TODO: a real test for this. + return disk_ != nullptr; +} + std::shared_ptr Drive::get_track() { if(disk_) return disk_->get_track_at_position(head_, (unsigned int)head_position_); if(track_) return track_; diff --git a/Storage/Disk/Drive.hpp b/Storage/Disk/Drive.hpp index 82e34fcd6..c67f5d1b6 100644 --- a/Storage/Disk/Drive.hpp +++ b/Storage/Disk/Drive.hpp @@ -65,6 +65,11 @@ class Drive { */ void set_track(const std::shared_ptr &track); + /*! + @returns @c true if the drive is ready; @c false otherwise. + */ + bool get_is_ready(); + private: std::shared_ptr track_; std::shared_ptr disk_;