mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-05 01:03:43 -04:00
emunand: Use HOS archive style for rawnand parts
This commit is contained in:
parent
a9afbd2458
commit
0177b612f4
6 changed files with 59 additions and 7 deletions
|
@ -300,6 +300,21 @@ int fsdev_unmount_all(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int fsdev_set_attr(const char *file, int attr, int mask) {
|
||||
return fsdev_convert_rc(NULL, f_chmod(file, (BYTE)attr, (BYTE)mask));
|
||||
}
|
||||
|
||||
int fsdev_get_attr(const char *file) {
|
||||
FILINFO info;
|
||||
FRESULT rc = f_stat(file, &info);
|
||||
|
||||
if (rc == FR_OK) {
|
||||
return info.fattrib;
|
||||
}
|
||||
|
||||
return fsdev_convert_rc(NULL, rc);
|
||||
}
|
||||
|
||||
/* Adapted from https://github.com/benemorius/openOBC-devboard/blob/bf0a4a33e22d24e7c299f921d185da27377310e0/lib/fatfs/FatFS.cpp#L173 */
|
||||
static int fsdev_convert_rc(struct _reent *r, FRESULT rc) {
|
||||
int errornumber;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue