mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 10:52:15 +02:00
Use FsStorageId as an input
This commit is contained in:
parent
4a3e8e805c
commit
dc7171d042
@ -19,16 +19,18 @@ void nsExit(void);
|
||||
Result nsGetApplicationControlData(u8 flag, u64 titleID, NsApplicationControlData* buffer, size_t size, size_t* actual_size);
|
||||
|
||||
/**
|
||||
* @brief Returns the total storage from content manager services.
|
||||
* @brief Returns the total storage size from content manager services.
|
||||
* @param media_id Specified FsStorageId. (Must be FsStorageId_SdCard or 5)
|
||||
* @param size Pointer to output the total storage size to.
|
||||
*/
|
||||
Result nsGetTotalSpaceSize(u64 *size);
|
||||
Result nsGetTotalSpaceSize(FsStorageId media_id, u64 *size);
|
||||
|
||||
/**
|
||||
* @brief Returns the available storage from content manager services.
|
||||
* @brief Returns the available storage size from content manager services.
|
||||
* @param media_id Specified FsStorageId. (Must be FsStorageId_SdCard or 5)
|
||||
* @param size Pointer to output the free storage size to.
|
||||
*/
|
||||
Result nsGetFreeSpaceSize(u64 *size);
|
||||
Result nsGetFreeSpaceSize(FsStorageId media_id, u64 *size);
|
||||
|
||||
Result nsvmInitialize(void);
|
||||
void nsvmExit(void);
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "arm/atomics.h"
|
||||
#include "kernel/ipc.h"
|
||||
#include "kernel/detect.h"
|
||||
#include "services/fs.h"
|
||||
#include "services/sm.h"
|
||||
#include "services/ns.h"
|
||||
|
||||
@ -117,7 +118,7 @@ Result nsGetApplicationControlData(u8 flag, u64 titleID, NsApplicationControlDat
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result nsGetTotalSpaceSize(u64 *size)
|
||||
Result nsGetTotalSpaceSize(FsStorageId media_id, u64 *size)
|
||||
{
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
@ -132,7 +133,7 @@ Result nsGetTotalSpaceSize(u64 *size)
|
||||
|
||||
raw->magic = SFCI_MAGIC;
|
||||
raw->cmd_id = 47;
|
||||
raw->media_id = 5;
|
||||
raw->media_id = media_id;
|
||||
|
||||
Result rc = serviceIpcDispatch(&g_nsAppManSrv);
|
||||
|
||||
@ -154,7 +155,7 @@ Result nsGetTotalSpaceSize(u64 *size)
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result nsGetFreeSpaceSize(u64 *size)
|
||||
Result nsGetFreeSpaceSize(FsStorageId media_id, u64 *size)
|
||||
{
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
@ -169,7 +170,7 @@ Result nsGetFreeSpaceSize(u64 *size)
|
||||
|
||||
raw->magic = SFCI_MAGIC;
|
||||
raw->cmd_id = 48;
|
||||
raw->media_id = 5;
|
||||
raw->media_id = media_id;
|
||||
|
||||
Result rc = serviceIpcDispatch(&g_nsAppManSrv);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user