pf2: add volume init, context register/unregister

This commit is contained in:
Michael Scire committed 2021-02-03 12:45:25 -08:00
1 parent f9c5470ac9
commit 7b01d59b3b
19 files changed
+883 -85

No files matched your search

@@ -64,4 +64,27 @@ namespace ams::prfile2::pdm {
return disk::CloseDisk(handle);
}
pdm::Error OpenPartition(HandleType disk_handle, u16 part_id, HandleType *out) {
/* Check the arguments. */
if (out == nullptr || IsInvalidHandle(disk_handle)) {
return pdm::Error_InvalidParameter;
}
/* Set the output as invalid. */
*out = InvalidHandle;
/* Open the partition. */
return part::OpenPartition(disk_handle, part_id, out);
}
pdm::Error ClosePartition(HandleType handle) {
/* Check the input. */
if (IsInvalidHandle(handle)) {
return pdm::Error_InvalidParameter;
}
/* Close the partition. */
return part::ClosePartition(handle);
}
}