Browse Source

Regenerate raw fs bindings

pull/10/head
Fenrir 8 years ago
parent
commit
b8a08d5b08
  1. 401
      ctru-sys/src/services/fs.rs

401
ctru-sys/src/services/fs.rs

@ -1,44 +1,45 @@
// TODO: Determine if anonymous enums are properly represented (they probably aren't) /* automatically generated by rust-bindgen */
#![allow(dead_code,
non_camel_case_types,
non_upper_case_globals,
non_snake_case)]
use ::{Handle, Result}; use ::{Handle, Result};
use ::libc::c_void;
#[derive(Clone, Copy)] pub const FS_OPEN_READ: u32 = 1;
#[repr(C)] pub const FS_OPEN_WRITE: u32 = 2;
pub enum Enum_Unnamed1 { pub const FS_OPEN_CREATE: u32 = 4;
FS_OPEN_READ = 1,
FS_OPEN_WRITE = 2,
FS_OPEN_CREATE = 4,
}
#[derive(Clone, Copy)] pub const FS_WRITE_FLUSH: u32 = 1;
#[repr(C)] pub const FS_WRITE_UPDATE_TIME: u32 = 256;
pub enum Enum_Unnamed2 {
FS_WRITE_FLUSH = 1,
FS_WRITE_UPDATE_TIME = 256,
}
#[derive(Clone, Copy)] pub const FS_ATTRIBUTE_DIRECTORY: u32 = 1;
#[repr(C)] pub const FS_ATTRIBUTE_HIDDEN: u32 = 256;
pub enum Enum_Unnamed3 { pub const FS_ATTRIBUTE_ARCHIVE: u32 = 65536;
FS_ATTRIBUTE_DIRECTORY = 1, pub const FS_ATTRIBUTE_READ_ONLY: u32 = 16777216;
FS_ATTRIBUTE_HIDDEN = 256,
FS_ATTRIBUTE_ARCHIVE = 65536,
FS_ATTRIBUTE_READ_ONLY = 16777216,
}
#[derive(Clone, Copy)] #[derive(Copy, Clone)]
#[repr(C)] #[repr(u32)]
pub enum Enum_Unnamed4 { #[derive(Debug)]
pub enum FS_MediaType {
MEDIATYPE_NAND = 0, MEDIATYPE_NAND = 0,
MEDIATYPE_SD = 1, MEDIATYPE_SD = 1,
MEDIATYPE_GAME_CARD = 2, MEDIATYPE_GAME_CARD = 2,
} }
#[derive(Copy, Clone)]
pub type FS_MediaType = Enum_Unnamed4; #[repr(u32)]
#[derive(Clone, Copy)] #[derive(Debug)]
#[repr(C)] pub enum FS_SystemMediaType {
pub enum Enum_Unnamed5 { SYSTEM_MEDIATYPE_CTR_NAND = 0,
SYSTEM_MEDIATYPE_TWL_NAND = 1,
SYSTEM_MEDIATYPE_SD = 2,
SYSTEM_MEDIATYPE_TWL_PHOTO = 3,
}
#[derive(Copy, Clone)]
#[repr(u32)]
#[derive(Debug)]
pub enum FS_ArchiveID {
ARCHIVE_ROMFS = 3, ARCHIVE_ROMFS = 3,
ARCHIVE_SAVEDATA = 4, ARCHIVE_SAVEDATA = 4,
ARCHIVE_EXTDATA = 6, ARCHIVE_EXTDATA = 6,
@ -57,33 +58,31 @@ pub enum Enum_Unnamed5 {
ARCHIVE_SAVEDATA_AND_CONTENT2 = 591751054, ARCHIVE_SAVEDATA_AND_CONTENT2 = 591751054,
ARCHIVE_NAND_CTR_FS = 1450741931, ARCHIVE_NAND_CTR_FS = 1450741931,
ARCHIVE_TWL_PHOTO = 1450741932, ARCHIVE_TWL_PHOTO = 1450741932,
ARCHIVE_TWL_SOUND = 1450741933,
ARCHIVE_NAND_TWL_FS = 1450741934, ARCHIVE_NAND_TWL_FS = 1450741934,
ARCHIVE_NAND_W_FS = 1450741935, ARCHIVE_NAND_W_FS = 1450741935,
ARCHIVE_GAMECARD_SAVEDATA = 1450741937, ARCHIVE_GAMECARD_SAVEDATA = 1450741937,
ARCHIVE_USER_SAVEDATA = 1450741938, ARCHIVE_USER_SAVEDATA = 1450741938,
ARCHIVE_DEMO_SAVEDATA = 1450741940, ARCHIVE_DEMO_SAVEDATA = 1450741940,
} }
pub type FS_ArchiveID = Enum_Unnamed5; #[derive(Copy, Clone)]
#[repr(u32)]
#[derive(Clone, Copy)] #[derive(Debug)]
#[repr(C)] pub enum FS_PathType {
pub enum Enum_Unnamed6 {
PATH_INVALID = 0, PATH_INVALID = 0,
PATH_EMPTY = 1, PATH_EMPTY = 1,
PATH_BINARY = 2, PATH_BINARY = 2,
PATH_ASCII = 3, PATH_ASCII = 3,
PATH_UTF16 = 4, PATH_UTF16 = 4,
} }
pub type FS_PathType = Enum_Unnamed6; #[derive(Copy, Clone)]
#[repr(u32)]
#[derive(Clone, Copy)] #[derive(Debug)]
#[repr(C)] pub enum FS_SecureValueSlot { SECUREVALUE_SLOT_SD = 4096, }
pub enum Enum_Unnamed7 { SECUREVALUE_SLOT_SD = 4096, } #[derive(Copy, Clone)]
pub type FS_SecureValueSlot = Enum_Unnamed7; #[repr(u32)]
#[derive(Debug)]
#[derive(Clone, Copy)] pub enum FS_CardSpiBaudRate {
#[repr(C)]
pub enum Enum_Unnamed8 {
BAUDRATE_512KHZ = 0, BAUDRATE_512KHZ = 0,
BAUDRATE_1MHZ = 1, BAUDRATE_1MHZ = 1,
BAUDRATE_2MHZ = 2, BAUDRATE_2MHZ = 2,
@ -91,64 +90,51 @@ pub enum Enum_Unnamed8 {
BAUDRATE_8MHZ = 4, BAUDRATE_8MHZ = 4,
BAUDRATE_16MHZ = 5, BAUDRATE_16MHZ = 5,
} }
pub type FS_CardSpiBaudRate = Enum_Unnamed8; #[derive(Copy, Clone)]
#[repr(u32)]
#[derive(Clone, Copy)] #[derive(Debug)]
#[repr(C)] pub enum FS_CardSpiBusMode { BUSMODE_1BIT = 0, BUSMODE_4BIT = 1, }
pub enum Enum_Unnamed9 { #[derive(Copy, Clone)]
BUSMODE_1BIT = 0, #[repr(u32)]
BUSMODE_4BIT = 1, #[derive(Debug)]
} pub enum FS_SpecialContentType {
pub type FS_CardSpiBusMode = Enum_Unnamed9;
#[derive(Clone, Copy)]
#[repr(C)]
pub enum Enum_Unnamed10 {
SPECIALCONTENT_UPDATE = 1, SPECIALCONTENT_UPDATE = 1,
SPECIALCONTENT_MANUAL = 2, SPECIALCONTENT_MANUAL = 2,
SPECIALCONTENT_DLP_CHILD = 3, SPECIALCONTENT_DLP_CHILD = 3,
} }
pub type FS_SpecialContentType = Enum_Unnamed10; #[derive(Copy, Clone)]
#[repr(u32)]
#[derive(Clone, Copy)] #[derive(Debug)]
#[repr(C)] pub enum FS_CardType { CARD_CTR = 0, CARD_TWL = 1, }
pub enum Enum_Unnamed11 { CARD_CTR = 0, CARD_TWL = 1, } #[derive(Copy, Clone)]
pub type FS_CardType = Enum_Unnamed11; #[repr(u32)]
#[derive(Debug)]
#[derive(Clone, Copy)] pub enum FS_Action { FS_ACTION_UNKNOWN = 0, }
#[repr(C)] #[derive(Copy, Clone)]
pub enum Enum_Unnamed12 { FS_ACTION_UNKNOWN = 0, } #[repr(u32)]
pub type FS_Action = Enum_Unnamed12; #[derive(Debug)]
pub enum FS_ArchiveAction {
#[derive(Clone, Copy)]
#[repr(C)]
pub enum Enum_Unnamed13 {
ARCHIVE_ACTION_COMMIT_SAVE_DATA = 0, ARCHIVE_ACTION_COMMIT_SAVE_DATA = 0,
ARCHIVE_ACTION_GET_TIMESTAMP = 1, ARCHIVE_ACTION_GET_TIMESTAMP = 1,
} }
pub type FS_ArchiveAction = Enum_Unnamed13; #[derive(Copy, Clone)]
#[repr(u32)]
#[derive(Clone, Copy)] #[derive(Debug)]
#[repr(C)] pub enum FS_SecureSaveAction {
pub enum Enum_Unnamed14 {
SECURESAVE_ACTION_DELETE = 0, SECURESAVE_ACTION_DELETE = 0,
SECURESAVE_ACTION_FORMAT = 1, SECURESAVE_ACTION_FORMAT = 1,
} }
pub type FS_SecureSaveAction = Enum_Unnamed14; #[derive(Copy, Clone)]
#[repr(u32)]
#[derive(Clone, Copy)] #[derive(Debug)]
#[repr(C)] pub enum FS_FileAction { FILE_ACTION_UNKNOWN = 0, }
pub enum Enum_Unnamed15 { FILE_ACTION_UNKNOWN = 0, } #[derive(Copy, Clone)]
pub type FS_FileAction = Enum_Unnamed15; #[repr(u32)]
#[derive(Debug)]
#[derive(Clone, Copy)] pub enum FS_DirectoryAction { DIRECTORY_ACTION_UNKNOWN = 0, }
#[repr(C)]
pub enum Enum_Unnamed16 { DIRECTORY_ACTION_UNKNOWN = 0, }
pub type FS_DirectoryAction = Enum_Unnamed16;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy)]
pub struct Struct_Unnamed17 { pub struct FS_DirectoryEntry {
pub name: [u16; 262usize], pub name: [u16; 262usize],
pub shortName: [u8; 10usize], pub shortName: [u8; 10usize],
pub shortExt: [u8; 4usize], pub shortExt: [u8; 4usize],
@ -157,169 +143,175 @@ pub struct Struct_Unnamed17 {
pub attributes: u32, pub attributes: u32,
pub fileSize: u64, pub fileSize: u64,
} }
impl ::core::clone::Clone for Struct_Unnamed17 { impl ::core::clone::Clone for FS_DirectoryEntry {
fn clone(&self) -> Self { *self } fn clone(&self) -> Self { *self }
} }
impl ::core::default::Default for Struct_Unnamed17 { impl ::core::default::Default for FS_DirectoryEntry {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_DirectoryEntry = Struct_Unnamed17;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed18 { #[derive(Debug)]
pub struct FS_ArchiveResource {
pub sectorSize: u32, pub sectorSize: u32,
pub clusterSize: u32, pub clusterSize: u32,
pub totalClusters: u32, pub totalClusters: u32,
pub freeClusters: u32, pub freeClusters: u32,
} }
impl ::core::clone::Clone for Struct_Unnamed18 { impl ::core::default::Default for FS_ArchiveResource {
fn clone(&self) -> Self { *self }
}
impl ::core::default::Default for Struct_Unnamed18 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_ArchiveResource = Struct_Unnamed18;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed19 { #[derive(Debug)]
pub struct FS_ProgramInfo {
pub programId: u64, pub programId: u64,
pub _bindgen_bitfield_1_: FS_MediaType, pub _bindgen_bitfield_1_: FS_MediaType,
pub padding: [u8; 7usize], pub padding: [u8; 7usize],
} }
impl ::core::clone::Clone for Struct_Unnamed19 { impl ::core::default::Default for FS_ProgramInfo {
fn clone(&self) -> Self { *self }
}
impl ::core::default::Default for Struct_Unnamed19 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_ProgramInfo = Struct_Unnamed19;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed20 { #[derive(Debug)]
pub struct FS_ProductInfo {
pub productCode: [u8; 16usize], pub productCode: [u8; 16usize],
pub companyCode: [u8; 2usize], pub companyCode: [u8; 2usize],
pub remasterVersion: u16, pub remasterVersion: u16,
} }
impl ::core::clone::Clone for Struct_Unnamed20 { impl ::core::default::Default for FS_ProductInfo {
fn clone(&self) -> Self { *self }
}
impl ::core::default::Default for Struct_Unnamed20 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_ProductInfo = Struct_Unnamed20;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy)]
pub struct Struct_Unnamed21 { pub struct FS_IntegrityVerificationSeed {
pub aesCbcMac: [u8; 16usize], pub aesCbcMac: [u8; 16usize],
pub movableSed: [u8; 288usize], pub movableSed: [u8; 288usize],
} }
impl ::core::clone::Clone for Struct_Unnamed21 { impl ::core::clone::Clone for FS_IntegrityVerificationSeed {
fn clone(&self) -> Self { *self } fn clone(&self) -> Self { *self }
} }
impl ::core::default::Default for Struct_Unnamed21 { impl ::core::default::Default for FS_IntegrityVerificationSeed {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_IntegrityVerificationSeed = Struct_Unnamed21;
#[repr(C, packed)] #[repr(C, packed)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed22 { #[derive(Debug)]
pub struct FS_ExtSaveDataInfo {
pub _bindgen_bitfield_1_: FS_MediaType, pub _bindgen_bitfield_1_: FS_MediaType,
pub unknown: u8, pub unknown: u8,
pub reserved1: u16, pub reserved1: u16,
pub saveId: u64, pub saveId: u64,
pub reserved2: u32, pub reserved2: u32,
} }
impl ::core::clone::Clone for Struct_Unnamed22 { impl ::core::default::Default for FS_ExtSaveDataInfo {
fn clone(&self) -> Self { *self }
}
impl ::core::default::Default for Struct_Unnamed22 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_ExtSaveDataInfo = Struct_Unnamed22;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed23 { #[derive(Debug)]
pub struct FS_SystemSaveDataInfo {
pub _bindgen_bitfield_1_: FS_MediaType, pub _bindgen_bitfield_1_: FS_MediaType,
pub unknown: u8, pub unknown: u8,
pub reserved: u16, pub reserved: u16,
pub saveId: u32, pub saveId: u32,
} }
impl ::core::clone::Clone for Struct_Unnamed23 { impl ::core::default::Default for FS_SystemSaveDataInfo {
fn clone(&self) -> Self { *self }
}
impl ::core::default::Default for Struct_Unnamed23 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_SystemSaveDataInfo = Struct_Unnamed23;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed24 { #[derive(Debug)]
pub struct FS_DeviceMoveContext {
pub ivs: [u8; 16usize], pub ivs: [u8; 16usize],
pub encryptParameter: [u8; 16usize], pub encryptParameter: [u8; 16usize],
} }
impl ::core::clone::Clone for Struct_Unnamed24 { impl ::core::default::Default for FS_DeviceMoveContext {
fn clone(&self) -> Self { *self }
}
impl ::core::default::Default for Struct_Unnamed24 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_DeviceMoveContext = Struct_Unnamed24;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed25 { #[derive(Debug)]
pub _type: FS_PathType, pub struct FS_Path {
pub type_: FS_PathType,
pub size: u32, pub size: u32,
pub data: *const c_void, pub data: *const ::libc::c_void,
} }
impl ::core::clone::Clone for Struct_Unnamed25 { impl ::core::default::Default for FS_Path {
fn clone(&self) -> Self { *self }
}
impl ::core::default::Default for Struct_Unnamed25 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_Path = Struct_Unnamed25; pub type FS_Archive = u64;
#[repr(C)] #[repr(C)]
#[derive(Copy)] #[derive(Copy, Clone)]
pub struct Struct_Unnamed26 { #[derive(Debug)]
pub id: u32, pub struct romfs_header {
pub lowPath: FS_Path, pub headerSize: u32,
pub handle: u64, pub dirHashTableOff: u32,
pub dirHashTableSize: u32,
pub dirTableOff: u32,
pub dirTableSize: u32,
pub fileHashTableOff: u32,
pub fileHashTableSize: u32,
pub fileTableOff: u32,
pub fileTableSize: u32,
pub fileDataOff: u32,
}
impl ::core::default::Default for romfs_header {
fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
impl ::core::clone::Clone for Struct_Unnamed26 { #[repr(C)]
fn clone(&self) -> Self { *self } #[derive(Copy, Clone)]
#[derive(Debug)]
pub struct romfs_dir {
pub parent: u32,
pub sibling: u32,
pub childDir: u32,
pub childFile: u32,
pub nextHash: u32,
pub nameLen: u32,
pub name: [u16; 0usize],
}
impl ::core::default::Default for romfs_dir {
fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
impl ::core::default::Default for Struct_Unnamed26 { #[repr(C)]
#[derive(Copy, Clone)]
#[derive(Debug)]
pub struct romfs_file {
pub parent: u32,
pub sibling: u32,
pub dataOff: u64,
pub dataSize: u64,
pub nextHash: u32,
pub nameLen: u32,
pub name: [u16; 0usize],
}
impl ::core::default::Default for romfs_file {
fn default() -> Self { unsafe { ::core::mem::zeroed() } } fn default() -> Self { unsafe { ::core::mem::zeroed() } }
} }
pub type FS_Archive = Struct_Unnamed26; pub enum romfs_mount { }
extern "C" { extern "C" {
pub fn fsInit() -> Result; pub fn fsInit() -> Result;
pub fn fsExit(); pub fn fsExit();
pub fn fsUseSession(session: Handle, sdmc: u8); pub fn fsUseSession(session: Handle);
pub fn fsEndUseSession(); pub fn fsEndUseSession();
pub fn fsMakePath(_type: FS_PathType, path: *const c_void) pub fn fsExemptFromSession(archive: FS_Archive);
pub fn fsUnexemptFromSession(archive: FS_Archive);
pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void)
-> FS_Path; -> FS_Path;
pub fn fsGetSessionHandle() -> *mut Handle; pub fn fsGetSessionHandle() -> *mut Handle;
pub fn FSUSER_Control(action: FS_Action, pub fn FSUSER_Control(action: FS_Action, input: *mut ::libc::c_void,
input: *mut c_void, inputSize: u32, inputSize: u32, output: *mut ::libc::c_void,
output: *mut c_void,
outputSize: u32) -> Result; outputSize: u32) -> Result;
pub fn FSUSER_Initialize(session: Handle) -> Result; pub fn FSUSER_Initialize(session: Handle) -> Result;
pub fn FSUSER_OpenFile(out: *mut Handle, archive: FS_Archive, pub fn FSUSER_OpenFile(out: *mut Handle, archive: FS_Archive,
path: FS_Path, openFlags: u32, attributes: u32) path: FS_Path, openFlags: u32, attributes: u32)
-> Result; -> Result;
pub fn FSUSER_OpenFileDirectly(out: *mut Handle, archive: FS_Archive, pub fn FSUSER_OpenFileDirectly(out: *mut Handle, archiveId: FS_ArchiveID,
path: FS_Path, openFlags: u32, archivePath: FS_Path, filePath: FS_Path,
attributes: u32) -> Result; openFlags: u32, attributes: u32)
-> Result;
pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result; pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result;
pub fn FSUSER_RenameFile(srcArchive: FS_Archive, srcPath: FS_Path, pub fn FSUSER_RenameFile(srcArchive: FS_Archive, srcPath: FS_Path,
dstArchive: FS_Archive, dstPath: FS_Path) dstArchive: FS_Archive, dstPath: FS_Path)
@ -337,17 +329,17 @@ extern "C" {
-> Result; -> Result;
pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive,
path: FS_Path) -> Result; path: FS_Path) -> Result;
pub fn FSUSER_OpenArchive(archive: *mut FS_Archive) -> Result; pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID,
path: FS_Path) -> Result;
pub fn FSUSER_ControlArchive(archive: FS_Archive, pub fn FSUSER_ControlArchive(archive: FS_Archive,
action: FS_ArchiveAction, action: FS_ArchiveAction,
input: *mut c_void, input: *mut ::libc::c_void, inputSize: u32,
inputSize: u32, output: *mut ::libc::c_void,
output: *mut c_void,
outputSize: u32) -> Result; outputSize: u32) -> Result;
pub fn FSUSER_CloseArchive(archive: *mut FS_Archive) -> Result; pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result;
pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64, archive: FS_Archive) pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64, archive: FS_Archive)
-> Result; -> Result;
pub fn FSUSER_GetCardType(_type: *mut FS_CardType) -> Result; pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result;
pub fn FSUSER_GetSdmcArchiveResource(archiveResource: pub fn FSUSER_GetSdmcArchiveResource(archiveResource:
*mut FS_ArchiveResource) *mut FS_ArchiveResource)
-> Result; -> Result;
@ -401,12 +393,13 @@ extern "C" {
pub fn FSUSER_GetSpecialContentIndex(index: *mut u16, pub fn FSUSER_GetSpecialContentIndex(index: *mut u16,
mediaType: FS_MediaType, mediaType: FS_MediaType,
programId: u64, programId: u64,
_type: FS_SpecialContentType) type_: FS_SpecialContentType)
-> Result; -> Result;
pub fn FSUSER_GetLegacyRomHeader(mediaType: FS_MediaType, programId: u64, pub fn FSUSER_GetLegacyRomHeader(mediaType: FS_MediaType, programId: u64,
header: *mut u8) -> Result; header: *mut u8) -> Result;
pub fn FSUSER_GetLegacyBannerData(mediaType: FS_MediaType, programId: u64, pub fn FSUSER_GetLegacyBannerData(mediaType: FS_MediaType,
banner: *mut u8) -> Result; programId: u64, banner: *mut u8)
-> Result;
pub fn FSUSER_CheckAuthorityToAccessExtSaveData(access: *mut u8, pub fn FSUSER_CheckAuthorityToAccessExtSaveData(access: *mut u8,
mediaType: FS_MediaType, mediaType: FS_MediaType,
saveId: u64, saveId: u64,
@ -425,11 +418,12 @@ extern "C" {
archiveId: FS_ArchiveID, path: FS_Path) archiveId: FS_ArchiveID, path: FS_Path)
-> Result; -> Result;
pub fn FSUSER_GetLegacyRomHeader2(headerSize: u32, pub fn FSUSER_GetLegacyRomHeader2(headerSize: u32,
mediaType: FS_MediaType, programId: u64, mediaType: FS_MediaType,
header: *mut u8) -> Result; programId: u64, header: *mut u8)
-> Result;
pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8, length: u32) -> Result; pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8, length: u32) -> Result;
pub fn FSUSER_GetArchiveResource(archiveResource: *mut FS_ArchiveResource, pub fn FSUSER_GetArchiveResource(archiveResource: *mut FS_ArchiveResource,
mediaType: FS_MediaType) -> Result; mediaType: FS_SystemMediaType) -> Result;
pub fn FSUSER_ExportIntegrityVerificationSeed(seed: pub fn FSUSER_ExportIntegrityVerificationSeed(seed:
*mut FS_IntegrityVerificationSeed) *mut FS_IntegrityVerificationSeed)
-> Result; -> Result;
@ -482,13 +476,14 @@ extern "C" {
emulateEndurance: u8) -> Result; emulateEndurance: u8) -> Result;
pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: u8) -> Result; pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: u8) -> Result;
pub fn FSUSER_EnumerateSystemSaveData(idsWritten: *mut u32, pub fn FSUSER_EnumerateSystemSaveData(idsWritten: *mut u32,
idsSize: u32, ids: *mut u64) idsSize: u32, ids: *mut u32)
-> Result; -> Result;
pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32) pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32)
-> Result; -> Result;
pub fn FSUSER_SetPriority(priority: u32) -> Result; pub fn FSUSER_SetPriority(priority: u32) -> Result;
pub fn FSUSER_GetPriority(priority: *mut u32) -> Result; pub fn FSUSER_GetPriority(priority: *mut u32) -> Result;
pub fn FSUSER_SetSaveDataSecureValue(value: u64, slot: FS_SecureValueSlot, pub fn FSUSER_SetSaveDataSecureValue(value: u64,
slot: FS_SecureValueSlot,
titleUniqueId: u32, titleUniqueId: u32,
titleVariation: u8) -> Result; titleVariation: u8) -> Result;
pub fn FSUSER_GetSaveDataSecureValue(exists: *mut u8, value: *mut u64, pub fn FSUSER_GetSaveDataSecureValue(exists: *mut u8, value: *mut u64,
@ -496,22 +491,21 @@ extern "C" {
titleUniqueId: u32, titleUniqueId: u32,
titleVariation: u8) -> Result; titleVariation: u8) -> Result;
pub fn FSUSER_ControlSecureSave(action: FS_SecureSaveAction, pub fn FSUSER_ControlSecureSave(action: FS_SecureSaveAction,
input: *mut c_void, input: *mut ::libc::c_void,
inputSize: u32, inputSize: u32,
output: *mut c_void, output: *mut ::libc::c_void,
outputSize: u32) -> Result; outputSize: u32) -> Result;
pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result; pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result;
pub fn FSFILE_Control(handle: Handle, action: FS_FileAction, pub fn FSFILE_Control(handle: Handle, action: FS_FileAction,
input: *mut c_void, inputSize: u32, input: *mut ::libc::c_void, inputSize: u32,
output: *mut c_void, output: *mut ::libc::c_void, outputSize: u32)
outputSize: u32) -> Result; -> Result;
pub fn FSFILE_OpenSubFile(handle: Handle, subFile: *mut Handle, pub fn FSFILE_OpenSubFile(handle: Handle, subFile: *mut Handle,
offset: u64, size: u64) -> Result; offset: u64, size: u64) -> Result;
pub fn FSFILE_Read(handle: Handle, bytesRead: *mut u32, offset: u64, pub fn FSFILE_Read(handle: Handle, bytesRead: *mut u32, offset: u64,
buffer: *mut c_void, size: u32) buffer: *mut ::libc::c_void, size: u32) -> Result;
-> Result;
pub fn FSFILE_Write(handle: Handle, bytesWritten: *mut u32, offset: u64, pub fn FSFILE_Write(handle: Handle, bytesWritten: *mut u32, offset: u64,
buffer: *const c_void, size: u32, buffer: *const ::libc::c_void, size: u32,
flags: u32) -> Result; flags: u32) -> Result;
pub fn FSFILE_GetSize(handle: Handle, size: *mut u64) -> Result; pub fn FSFILE_GetSize(handle: Handle, size: *mut u64) -> Result;
pub fn FSFILE_SetSize(handle: Handle, size: u64) -> Result; pub fn FSFILE_SetSize(handle: Handle, size: u64) -> Result;
@ -525,13 +519,18 @@ extern "C" {
pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle)
-> Result; -> Result;
pub fn FSDIR_Control(handle: Handle, action: FS_DirectoryAction, pub fn FSDIR_Control(handle: Handle, action: FS_DirectoryAction,
input: *mut c_void, inputSize: u32, input: *mut ::libc::c_void, inputSize: u32,
output: *mut c_void, output: *mut ::libc::c_void, outputSize: u32)
outputSize: u32) -> Result; -> Result;
pub fn FSDIR_Read(handle: Handle, entriesRead: *mut u32, pub fn FSDIR_Read(handle: Handle, entriesRead: *mut u32,
entryCount: u32, entries: *mut FS_DirectoryEntry) entryCount: u32, entries: *mut FS_DirectoryEntry)
-> Result; -> Result;
pub fn FSDIR_Close(handle: Handle) -> Result; pub fn FSDIR_Close(handle: Handle) -> Result;
pub fn FSDIR_SetPriority(handle: Handle, priority: u32) -> Result; pub fn FSDIR_SetPriority(handle: Handle, priority: u32) -> Result;
pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32) -> Result; pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32) -> Result;
pub fn romfsMount(mount: *mut *mut romfs_mount) -> Result;
pub fn romfsMountFromFile(file: Handle, offset: u32,
mount: *mut *mut romfs_mount) -> Result;
pub fn romfsBind(mount: *mut romfs_mount) -> Result;
pub fn romfsUnmount(mount: *mut romfs_mount) -> Result;
} }

Loading…
Cancel
Save