diff --git a/headers/private/fs_shell/fssh_stat.h b/headers/private/fs_shell/fssh_stat.h index b85f5dea7d..ea72633152 100644 --- a/headers/private/fs_shell/fssh_stat.h +++ b/headers/private/fs_shell/fssh_stat.h @@ -31,6 +31,7 @@ struct fssh_stat { // can only retrieve the R5 stat structure unsigned int fssh_st_type; /* attribute/index type */ }; +typedef struct fssh_stat fssh_struct_stat; /* extended file types */ #define FSSH_S_ATTR_DIR 01000000000 /* attribute directory */ diff --git a/src/tools/fs_shell/vfs.cpp b/src/tools/fs_shell/vfs.cpp index f171e408ff..a5ba099d5b 100644 --- a/src/tools/fs_shell/vfs.cpp +++ b/src/tools/fs_shell/vfs.cpp @@ -4959,17 +4959,17 @@ _kern_access(const char *path, int mode) fssh_status_t _kern_read_stat(int fd, const char *path, bool traverseLeafLink, - struct ::fssh_stat *stat, fssh_size_t statSize) + fssh_struct_stat *stat, fssh_size_t statSize) { - struct ::fssh_stat completeStat; - struct ::fssh_stat *originalStat = NULL; + fssh_struct_stat completeStat; + fssh_struct_stat *originalStat = NULL; fssh_status_t status; - if (statSize > sizeof(struct ::fssh_stat)) + if (statSize > sizeof(fssh_struct_stat)) return FSSH_B_BAD_VALUE; // this supports different stat extensions - if (statSize < sizeof(struct ::fssh_stat)) { + if (statSize < sizeof(fssh_struct_stat)) { originalStat = stat; stat = &completeStat; } @@ -5028,16 +5028,16 @@ _kern_read_stat(int fd, const char *path, bool traverseLeafLink, fssh_status_t _kern_write_stat(int fd, const char *path, bool traverseLeafLink, - const struct ::fssh_stat *stat, fssh_size_t statSize, int statMask) + const fssh_struct_stat *stat, fssh_size_t statSize, int statMask) { - struct ::fssh_stat completeStat; + fssh_struct_stat completeStat; - if (statSize > sizeof(struct ::fssh_stat)) + if (statSize > sizeof(fssh_struct_stat)) return FSSH_B_BAD_VALUE; // this supports different stat extensions - if (statSize < sizeof(struct ::fssh_stat)) { - fssh_memset((uint8_t *)&completeStat + statSize, 0, sizeof(struct ::fssh_stat) - statSize); + if (statSize < sizeof(fssh_struct_stat)) { + fssh_memset((uint8_t *)&completeStat + statSize, 0, sizeof(fssh_struct_stat) - statSize); fssh_memcpy(&completeStat, stat, statSize); stat = &completeStat; } @@ -5128,7 +5128,7 @@ _kern_create_index(fssh_dev_t device, const char *name, uint32_t type, uint32_t fssh_status_t -_kern_read_index_stat(fssh_dev_t device, const char *name, struct ::fssh_stat *stat) +_kern_read_index_stat(fssh_dev_t device, const char *name, fssh_struct_stat *stat) { return index_name_read_stat(device, name, stat, true); }