MinFS file system FUSE implementation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
871 B

#ifndef MF_MINFS
#define MF_MINFS
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#define MF_FLAG_DIR (1 << 0)
#define MF_FLAG_EXTRA (1 << 1)
#define MF_FLAG_COMPR (1 << 2)
typedef uint16_t minfs_short_t;
typedef uint32_t minfs_long_t;
typedef struct {
char magic[6];
minfs_short_t version;
minfs_long_t tree_offset;
minfs_long_t root_size;
minfs_long_t tree_entries;
minfs_long_t tree_size;
minfs_long_t fdata_length;
minfs_long_t image_size;
} minfs_header_t;
typedef struct {
minfs_long_t offset;
minfs_long_t raw_size;
minfs_long_t orig_size;
minfs_short_t entry_length;
minfs_short_t flags;
minfs_short_t name_length;
minfs_short_t extra_length;
} minfs_entry_t;
minfs_entry_t *minfs_get_entry(const char *, void *, minfs_long_t, minfs_long_t, minfs_long_t);
#endif /* end of include guard: MF_MINFS */