pf2: add volume init, context register/unregister

This commit is contained in:
Michael Scire
2020-11-26 03:27:07 -08:00
parent f9c5470ac9
commit 7b01d59b3b
19 changed files with 883 additions and 85 deletions

View File

@@ -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);
}
}