summaryrefslogtreecommitdiffstats
path: root/sw/z80/kernel/include/fs/dirent.h
blob: 2fd224ae3c3adae00fae004ccb50cc6b15ebc802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef __DIRENT_H__
#define __DIRENT_H__

#include "types.h"

struct dirent
{
    ino_t       inode;       // inode referred
    uint8_t     name_size;    // size of the name
    char        name[];         // name of the referred inode
};

/* if inode is FS_INO_NULL, then the dirent is a memory leak */
/* Warning: dirent leaks are generated by rm or rmdir operations */
/* Filesystem must be periodically checked and cleaned */

#endif  // __DIRENT_H__