Add fsh_t type for filesystem handles

This commit is contained in:
2025-10-29 15:39:46 +01:00
parent 815c2239fe
commit 7db6a8e130
3 changed files with 4 additions and 2 deletions

View File

@ -21,4 +21,6 @@ typedef struct {
char name[0x100];
} FsDirent;
typedef int32_t fsh_t;
#endif // SHARE_SYSDEFS_FS_H_

View File

@ -51,7 +51,7 @@ void fs_fetch(void) {
}
if (statbuf.type == FSSTAT_FILE) {
int32_t h = fs_openf(path, FS_OF_READ);
fsh_t h = fs_openf(path, FS_OF_READ);
if (h < 0) {
uprintf("fs: could not open %s\n", path);
return;

View File

@ -44,7 +44,7 @@ void set_config(void) {
}
void do_file(char *filepath) {
int32_t h = fs_openf(filepath, FS_OF_READ);
fsh_t h = fs_openf(filepath, FS_OF_READ);
if (h < 0) {
LOG(LOG_ERR, "Could not open %s: %s\n", filepath, ERRSTRING(h));
return;