wut  v1.7.0
Wii U Toolchain
Data Structures | Typedefs | Enumerations | Functions
nn::spm Namespace Reference

Data Structures

struct  VolumeId
 
struct  StorageListItem
 
struct  StorageInfo
 

Typedefs

using StorageIndex = uint64_t
 

Enumerations

enum  StorageType : uint32_t {
  STORAGE_TYPE_RAW ,
  STORAGE_TYPE_WFS
}
 

Functions

void Initialize () asm("Initialize__Q2_2nn3spmFv")
 
void Finalize () asm("Finalize__Q2_2nn3spmFv")
 
void SetAutoFatal (bool enabled) asm("SetAutoFatal__Q2_2nn3spmFb")
 
int32_t SetExtendedStorage (StorageIndex *index) asm("SetExtendedStorage__Q2_2nn3spmFQ3_2nn3spm12StorageIndex")
 Sets the storage drive which should be used for extended storage. More...
 
void SetDefaultExtendedStorageVolumeId (VolumeId const &id) asm("SetDefaultExtendedStorageVolumeId__Q2_2nn3spmFRCQ3_2nn3spm8VolumeId")
 Sets the id of the default extended storage drive. More...
 
void GetDefaultExtendedStorageVolumeId (VolumeId *id) asm("GetDefaultExtendedStorageVolumeId__Q2_2nn3spmFv")
 Gets the id of the default extended storage drive. More...
 
bool GetPreviousExtendedStorageVolumeId (bool *, VolumeId *outVolumeId) asm("GetPreviousExtendedStorageVolumeId__Q2_2nn3spmFPbPQ3_2nn3spm8VolumeId")
 
bool FindStorageByVolumeId (StorageIndex *outIndex, VolumeId const &volumeId) asm("FindStorageByVolumeId__Q2_2nn3spmFPQ3_2nn3spm12StorageIndexRCQ3_2nn3spm8VolumeId")
 
int32_t GetExtendedStorageIndex (StorageIndex *outIndex) asm("GetExtendedStorageIndex__Q2_2nn3spmFPQ3_2nn3spm12StorageIndex")
 
int32_t GetStorageList (StorageListItem *items, uint32_t maxNumItems) asm("GetStorageList__Q2_2nn3spmFPQ3_2nn3spm15StorageListItemUi")
 
int32_t GetStorageInfo (StorageInfo *outInfo, StorageIndex *index) asm("GetStorageInfo__Q2_2nn3spmFPQ3_2nn3spm11StorageInfoQ3_2nn3spm12StorageIndex")
 
int32_t ReadRawStorageHead512 (StorageIndex *index, char *outBuffer) asm("ReadRawStorageHead512__Q2_2nn3spmFQ3_2nn3spm12StorageIndexPc")
 Reads the first 512 bytes of the storage head into the buffer. More...
 
int32_t IsStorageMaybePcFormatted (bool *isPcFormatted, StorageIndex *index) asm("IsStorageMaybePcFormatted__Q2_2nn3spmFPbQ3_2nn3spm12StorageIndex")
 
int32_t IsStorageMaybeWfsFormatted (bool *isWfsFormatted, StorageIndex *index) asm("IsStorageMaybeWfsFormatted__Q2_2nn3spmFPbQ3_2nn3spm12StorageIndex")
 

Data Structure Documentation

◆ nn::spm::StorageListItem

struct nn::spm::StorageListItem

Definition at line 48 of file storage.h.

Data Fields
StorageIndex index
StorageType type

◆ nn::spm::StorageInfo

struct nn::spm::StorageInfo

Definition at line 58 of file storage.h.

Data Fields
char path[0x280] The mount path (e.g. "/vol/storage_usb01")
char connection_type_string[8] The connection type (e.g. "usb")
char format_string[8] The drive format (e.g. "raw" / "wfs")
StorageType type
VolumeId volumeId

Typedef Documentation

◆ StorageIndex

using StorageIndex = uint64_t

Definition at line 24 of file storage.h.

Enumeration Type Documentation

◆ StorageType

enum StorageType : uint32_t
Enumerator
STORAGE_TYPE_RAW 
STORAGE_TYPE_WFS 

Definition at line 18 of file storage.h.

Function Documentation

◆ Initialize()

void nn::spm::Initialize ( )

◆ Finalize()

void nn::spm::Finalize ( )

◆ SetAutoFatal()

void nn::spm::SetAutoFatal ( bool  enabled)

◆ SetExtendedStorage()

int32_t nn::spm::SetExtendedStorage ( StorageIndex index)

Sets the storage drive which should be used for extended storage.

Returns
0 on success.

◆ SetDefaultExtendedStorageVolumeId()

void nn::spm::SetDefaultExtendedStorageVolumeId ( VolumeId const &  id)

Sets the id of the default extended storage drive.

◆ GetDefaultExtendedStorageVolumeId()

void nn::spm::GetDefaultExtendedStorageVolumeId ( VolumeId id)

Gets the id of the default extended storage drive.

◆ GetPreviousExtendedStorageVolumeId()

bool nn::spm::GetPreviousExtendedStorageVolumeId ( bool *  ,
VolumeId outVolumeId 
)

◆ FindStorageByVolumeId()

bool nn::spm::FindStorageByVolumeId ( StorageIndex outIndex,
VolumeId const &  volumeId 
)

◆ GetExtendedStorageIndex()

int32_t nn::spm::GetExtendedStorageIndex ( StorageIndex outIndex)

◆ GetStorageList()

int32_t nn::spm::GetStorageList ( StorageListItem items,
uint32_t  maxNumItems 
)

◆ GetStorageInfo()

int32_t nn::spm::GetStorageInfo ( StorageInfo outInfo,
StorageIndex index 
)

◆ ReadRawStorageHead512()

int32_t nn::spm::ReadRawStorageHead512 ( StorageIndex index,
char *  outBuffer 
)

Reads the first 512 bytes of the storage head into the buffer.

Returns
0 on success.

◆ IsStorageMaybePcFormatted()

int32_t nn::spm::IsStorageMaybePcFormatted ( bool *  isPcFormatted,
StorageIndex index 
)
Parameters
isPcFormattedTrue if the drive contains a valid MBR with at least one active partition
Returns
0 on success.

◆ IsStorageMaybeWfsFormatted()

int32_t nn::spm::IsStorageMaybeWfsFormatted ( bool *  isWfsFormatted,
StorageIndex index 
)
Parameters
isWfsFormattedTrue if the drive does not contain a valid MBR
Returns
0 on success.