I have been told that I need to add a new file type to linux. File types are declared in fs.h Relevant part posted here:
* File types
* NOTE! These match bits 12..15 of stat.st_mode
* (ie "(i_mode >> 12) & 15").
*/
#define DT_UNKNOWN 0
#define DT_FIFO 1
#define DT_CHR 2
#define DT_DIR 4
#define DT_BLK 6
#define DT_REG 8
#define DT_LNK 10
#define DT_SOCK 12
#define DT_WHT 14
The problem is, they want me to define a new file type with the value of... 16. How is this even possible when we only get 4 bits to represent the file type?