6#ifndef _PSP2KERN_IDSTORAGE_H_
7#define _PSP2KERN_IDSTORAGE_H_
15#define SCE_ID_STORAGE_LEAF_SIZE 0x200
16#define SCE_ID_STORAGE_KEY_MAX 0xFFEF
17#define SCE_ID_STORAGE_ATOMIC_LEAVES_MAX 32
SceIdStorageErrorCode
Module-specific errors returned by SceIdStorage on FW 3.60.
Definition idstorage.h:20
int ksceIdStorageRestart(SceBool flush)
Destroy and reinitialize the IdStorage state on FW 3.60.
SceBool ksceIdStorageIsReadOnly(void)
Return the cached read-only flag.
SceBool ksceIdStorageIsDirty(void)
Check whether changes still need to be written to storage.
int ksceIdStorageReadLeaf(SceUInt32 key, void *buf)
Read one complete IdStorage leaf.
int ksceIdStorageUnformat(void)
Mark the IdStorage partition unformatted.
int ksceIdStorageFormat(void)
Initialize a new IdStorage mapping table.
int ksceIdStorageGetFreeLeaves(void)
Count unallocated mapping entries, which contain 0xFFFF.
int ksceIdStorageDeleteLeaf(SceUInt32 key)
Delete one leaf mapping.
SceSize ksceIdStorageGetLeafSize(void)
Get the fixed IdStorage leaf size.
int ksceIdStorageFlush(void)
Write modified cached leaves and mapping-table changes to storage.
SceBool ksceIdStorageIsFormatted(void)
Check whether the mapping table was loaded or formatted successfully.
int ksceIdStorageLookup(SceUInt32 key, SceUInt32 offset, void *buf, SceSize size)
Read a range from an existing leaf.
int ksceIdStorageCreateLeaf(SceUInt32 key)
Create one leaf mapping.
int ksceIdStorageWriteLeaf(SceUInt32 key, const void *buf)
Replace one complete IdStorage leaf in the write-back cache.
int ksceIdStorageCreateAtomicLeaves(const SceUInt16 *keys, SceInt32 num_leaves)
Create several leaf mappings as one in-memory operation.
int ksceIdStorageEnumId(void)
Acquire and release the IdStorage mutex.
int ksceIdStorageUpdate(SceUInt32 key, SceUInt32 offset, const void *buf, SceSize size)
Replace a range in an existing leaf through a cached read-modify-write.
@ SCE_ID_STORAGE_ERROR_INVALID_KEY
The key is greater than SCE_ID_STORAGE_KEY_MAX.
Definition idstorage.h:22
@ SCE_ID_STORAGE_ERROR_LEAF_ALREADY_EXISTS
The requested key already has a mapping-table entry.
Definition idstorage.h:27
@ SCE_ID_STORAGE_ERROR_NOT_FORMATTED
IdStorage is not formatted or initialized.
Definition idstorage.h:24
@ SCE_ID_STORAGE_ERROR_NO_SPACE
Heap allocation failed or no mapping slots remain.
Definition idstorage.h:25
@ SCE_ID_STORAGE_ERROR_LEAF_NOT_FOUND
The requested key has no mapping-table entry.
Definition idstorage.h:26
@ SCE_ID_STORAGE_ERROR_INVALID_ARGUMENT
Invalid argument or range, or not in the required manufacturing mode.
Definition idstorage.h:21
@ SCE_ID_STORAGE_ERROR_INVALID_LEAF_COUNT
Atomic leaf count is outside 1 through 32.
Definition idstorage.h:23
SceSize size
Definition lsdb.h:11
SceUInt32 key
FNV-1a hash of the AppInfo key.
Definition lsdb.h:0
int SceBool
Definition types.h:59
int32_t SceInt32
Definition types.h:44
unsigned int SceSize
Definition types.h:56
uint16_t SceUInt16
Definition types.h:42
uint32_t SceUInt32
Definition types.h:45