2024-05-12 16:16:15 +02:00
|
|
|
package pfsmgr
|
|
|
|
|
|
|
|
|
|
import "core:c"
|
|
|
|
|
import sce "../common"
|
|
|
|
|
|
|
|
|
|
foreign import pfsmgr "system:ScePfsMgeForKernel_stub"
|
|
|
|
|
|
|
|
|
|
ScePfsRndDriveId :: struct {
|
|
|
|
|
drive_id: [0x10]c.char,
|
|
|
|
|
}
|
|
|
|
|
#assert(size_of(ScePfsRndDriveId) == 0x10)
|
|
|
|
|
|
|
|
|
|
foreign pfsmgr {
|
|
|
|
|
/**
|
|
|
|
|
* Mount pfs directory
|
|
|
|
|
*
|
|
|
|
|
* @param[in] path - The pfs encrypted directory path
|
|
|
|
|
* @param[in] rnd_drive_id - The pfs mount target Pseudo Drive strings
|
|
|
|
|
* @param[in] authid - The authid
|
|
|
|
|
* @param[in] klicensee - The klicensee
|
|
|
|
|
* @param[in] mode_index - The mode_index
|
|
|
|
|
*
|
|
|
|
|
* @return 0 on success, < 0 on error.
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
kscePfsMount :: proc(path: cstring, #by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64, klicensee: rawptr, mode_index: c.uint16_t) -> c.int ---
|
2024-05-12 16:16:15 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Mount pfs directory without authid
|
|
|
|
|
*
|
|
|
|
|
* @param[in] path - The pfs encrypted directory path
|
|
|
|
|
* @param[in] rnd_drive_id - The pfs mount target Pseudo Drive strings
|
|
|
|
|
* @param[in] klicensee - The klicensee
|
|
|
|
|
* @param[in] mode_index - The mode_index
|
|
|
|
|
*
|
|
|
|
|
* @return 0 on success, < 0 on error.
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
kscePfsMount2 :: proc(path: cstring, #by_ptr rnd_drive_id: ScePfsRndDriveId, klicensee: rawptr, mode_index: c.uint16_t) -> c.int ---
|
2024-05-12 16:16:15 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Unmount pfs directory
|
|
|
|
|
*
|
|
|
|
|
* @param[in] rnd_drive_id - The pfs mount drive strings
|
|
|
|
|
*
|
|
|
|
|
* @return 0 on success, < 0 on error.
|
|
|
|
|
*/
|
2024-05-13 16:04:23 +02:00
|
|
|
kscePfsUnmount :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId) -> c.int ---
|
2024-05-12 16:16:15 +02:00
|
|
|
|
2024-05-13 16:04:23 +02:00
|
|
|
kscePfsApprove :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64) -> c.int ---
|
|
|
|
|
kscePfsDisapprove :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64) -> c.int ---
|
2024-05-12 16:16:15 +02:00
|
|
|
}
|