mirror of
https://github.com/switchbrew/libnx.git
synced 2025-08-07 00:29:23 +02:00
Added fsdevGetDeviceFileSystem().
This commit is contained in:
parent
c1b4b95bd7
commit
52686826d1
@ -36,6 +36,9 @@ int fsdevUnmountDevice(const char *name);
|
|||||||
/// This is not used automatically at device unmount.
|
/// This is not used automatically at device unmount.
|
||||||
Result fsdevCommitDevice(const char *name);
|
Result fsdevCommitDevice(const char *name);
|
||||||
|
|
||||||
|
/// Returns the FsFileSystem for the specified device. Returns NULL when the specified device isn't found.
|
||||||
|
FsFileSystem* fsdevGetDeviceFileSystem(const char *name);
|
||||||
|
|
||||||
/// Returns the FsFileSystem for the default device (SD card), if mounted. Used internally by romfs_dev.
|
/// Returns the FsFileSystem for the default device (SD card), if mounted. Used internally by romfs_dev.
|
||||||
FsFileSystem* fsdevGetDefaultFileSystem(void);
|
FsFileSystem* fsdevGetDefaultFileSystem(void);
|
||||||
|
|
||||||
|
@ -456,6 +456,17 @@ Result fsdevUnmountAll(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FsFileSystem* fsdevGetDeviceFileSystem(const char *name)
|
||||||
|
{
|
||||||
|
fsdev_fsdevice *device;
|
||||||
|
|
||||||
|
device = fsdevFindDevice(name);
|
||||||
|
if(device==NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return &device->fs;
|
||||||
|
}
|
||||||
|
|
||||||
FsFileSystem* fsdevGetDefaultFileSystem(void)
|
FsFileSystem* fsdevGetDefaultFileSystem(void)
|
||||||
{
|
{
|
||||||
if(!fsdev_initialised) return NULL;
|
if(!fsdev_initialised) return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user