emunand: Use HOS archive style for rawnand parts
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user