Files
pepperOS/include/fs/tar.h
T
2026-04-09 16:08:19 +02:00

36 lines
650 B
C

/*
* @author xamidev <xamidev@riseup.net>
* @brief Tape archive (TAR) filesystem definitions
* @license GPL-3.0-only
*/
#ifndef TAR_H
#define TAR_H
#include <stdint.h>
#include <limine.h>
struct tar_header
{
char filename[100];
char mode[8];
char uid[8];
char gid[8];
char size[12];
char mtime[12];
char chksum[8];
char typeflag[1];
};
struct tar_file
{
void* address;
uint64_t size;
};
unsigned int tar_parse(uint64_t address);
int tar_init_fs(struct limine_file* file);
struct tar_header* tar_file_lookup(const char* filename);
void tar_file_read(struct tar_header* header, uint8_t* buf);
#endif