pf2: drv::IsDetected

This commit is contained in:
Michael Scire
2021-02-02 23:18:52 -08:00
parent a2f611edb7
commit 60ea1dade2
5 changed files with 63 additions and 0 deletions

View File

@@ -42,6 +42,14 @@ namespace ams::prfile2::drv {
return pf::Error_Ok;
}
bool IsDetected(Volume *volume) {
/* Check detect status changed. */
/* NOTE: Error is not checked here. */
bool detected = false;
pdm::part::CheckMediaDetect(volume->partition_handle, std::addressof(detected));
return detected;
}
bool IsInserted(Volume *volume) {
/* Check inserted. */
/* NOTE: Error is not checked here. */