33 lines
564 B
C
33 lines
564 B
C
#ifndef INODE_H_
|
|
#define INODE_H_
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "util.h"
|
|
|
|
typedef struct Inode Inode;
|
|
|
|
struct Inode {
|
|
// file information
|
|
char name[64];
|
|
uint32_t filesize;
|
|
|
|
// ownership and permissions
|
|
uint16_t permissions;
|
|
uint16_t owner;
|
|
uint16_t group;
|
|
|
|
// timestamps
|
|
tm created;
|
|
tm last_modified;
|
|
|
|
// fs attributes
|
|
uint32_t index;
|
|
uint16_t block_count;
|
|
block* data_block;
|
|
};
|
|
|
|
Inode* create_inode(char name[64], uint16_t owner, uint16_t group, block* data_block);
|
|
|
|
#endif // INODE_H_
|