Files
mop3/kernel/fs/tarfs/tarfs.h
kamkow1 c8fb575bdd
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 2m7s
Build documentation / build-and-deploy (push) Successful in 39s
Change formatting rules
2026-04-24 01:54:48 +02:00

59 lines
1.0 KiB
C

#ifndef _KERNEL_FS_TARFS_H
#define _KERNEL_FS_TARFS_H
#include <desc.h>
#include <device/device.h>
#include <dir_entry.h>
#include <fs/def_vfs_op.h>
#include <libk/std.h>
#include <proc/proc.h>
#include <proc/reschedule.h>
struct tar_header {
char filename[100];
uint8_t mode[8];
uint8_t uid[8];
uint8_t gid[8];
uint8_t size[12];
uint8_t mtime[12];
uint8_t checksum[8];
uint8_t type_flag;
} PACKED;
struct tar_file {
struct tar_header* header;
uint8_t* content;
size_t size;
};
#define TARFS_FILES_MAX 128
struct tarfs {
struct tar_file tarfs_files[TARFS_FILES_MAX];
uint8_t* buffer;
};
struct vfs_volume;
DEFINE_VFS_MOUNT(tarfs_mount);
DEFINE_VFS_UNMOUNT(tarfs_unmount);
DEFINE_VFS_FORMAT(tarfs_format);
DEFINE_VFS_DESCRIBE(tarfs_describe);
DEFINE_VFS_READ_FILE(tarfs_read_file);
DEFINE_VFS_WRITE_FILE(tarfs_write_file);
DEFINE_VFS_READ_DIR_ENTRY(tarfs_read_dir_entry);
DEFINE_VFS_CREATE_FILE(tarfs_create_file);
DEFINE_VFS_CREATE_DIR(tarfs_create_dir);
DEFINE_VFS_REMOVE(tarfs_remove);
#endif // _KERNEL_FS_TARFS_H