Skip to content
Snippets Groups Projects
Verified Commit 4c977d6a authored by rahix's avatar rahix
Browse files

fix(fatfs): Remove typedef for epic_stat


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent b7e210c9
No related branches found
No related tags found
No related merge requests found
......@@ -620,8 +620,8 @@ enum epic_stat_type {
};
/** */
typedef struct epic_stat_t {
/** type: file, directory or none */
struct epic_stat {
/** Entity Type: file, directory or none */
enum epic_stat_type type;
/* note about padding & placement of uint32_t size:
* to accomodate for future expansion, we want padding at the end of
......@@ -636,11 +636,11 @@ typedef struct epic_stat_t {
* between system and user volume)*/
uint8_t volume;
uint8_t _reserved[9];
} epic_stat_t;
};
#ifndef __cplusplus
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
_Static_assert(sizeof(epic_stat_t) == 20, "");
_Static_assert(sizeof(struct epic_stat) == 20, "");
#endif
#endif
......@@ -648,11 +648,13 @@ _Static_assert(sizeof(epic_stat_t) == 20, "");
* stat path
*
* :param const char* filename: path to stat
* :param epic_stat_t* stat: pointer to result
* :param epic_stat* stat: pointer to result
*
* :return: `0` on success, negative on error
*/
API(API_FILE_STAT, int epic_file_stat(const char* path, epic_stat_t* stat));
API(API_FILE_STAT, int epic_file_stat(
const char* path, struct epic_stat* stat
));
/**
* RTC
......
......@@ -280,7 +280,7 @@ int epic_file_tell(int fd)
return f_tell(&o->file);
}
int epic_file_stat(const char *filename, epic_stat_t *stat)
int epic_file_stat(const char *filename, struct epic_stat *stat)
{
int res;
FILINFO finfo;
......
......@@ -69,7 +69,7 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename)
mp_import_stat_t mp_import_stat(const char *path)
{
struct epic_stat_t stat;
struct epic_stat stat;
if (epic_file_stat(path, &stat) == 0) {
if (stat.type == EPICSTAT_FILE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment