Add fsh_t type for filesystem handles
This commit is contained in:
@ -21,4 +21,6 @@ typedef struct {
|
|||||||
char name[0x100];
|
char name[0x100];
|
||||||
} FsDirent;
|
} FsDirent;
|
||||||
|
|
||||||
|
typedef int32_t fsh_t;
|
||||||
|
|
||||||
#endif // SHARE_SYSDEFS_FS_H_
|
#endif // SHARE_SYSDEFS_FS_H_
|
||||||
|
|||||||
@ -51,7 +51,7 @@ void fs_fetch(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (statbuf.type == FSSTAT_FILE) {
|
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) {
|
if (h < 0) {
|
||||||
uprintf("fs: could not open %s\n", path);
|
uprintf("fs: could not open %s\n", path);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -44,7 +44,7 @@ void set_config(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void do_file(char *filepath) {
|
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) {
|
if (h < 0) {
|
||||||
LOG(LOG_ERR, "Could not open %s: %s\n", filepath, ERRSTRING(h));
|
LOG(LOG_ERR, "Could not open %s: %s\n", filepath, ERRSTRING(h));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user