Add fsdevSetArchiveBit wrapper

This commit is contained in:
Michael Scire 2018-11-09 18:20:12 -08:00
parent 776e313413
commit 8414bd51ad
2 changed files with 13 additions and 0 deletions

View File

@ -42,5 +42,8 @@ FsFileSystem* fsdevGetDeviceFileSystem(const char *name);
/// Returns the FsFileSystem for the default device (SD card), if mounted. Used internally by romfs_dev.
FsFileSystem* fsdevGetDefaultFileSystem(void);
/// This calls fsFsSetArchiveBit on the filesystem specified by the input absolute path.
Result fsdevSetArchiveBit(const char *path);
/// Unmounts all devices and cleans up any resources used by the FS driver.
Result fsdevUnmountAll(void);

View File

@ -368,6 +368,16 @@ Result fsdevCommitDevice(const char *name)
return fsFsCommit(&device->fs);
}
Result fsdevSetArchiveBit(const char *path) {
fsdev_fsdevice *device;
device = fsdevFindDevice(path);
if(device==NULL)
return MAKERESULT(Module_Libnx, LibnxError_NotFound);
return fsFsSetArchiveBit(&device->fs, path);
}
/*! Initialize SDMC device */
Result fsdevMountSdmc(void)
{