tar_file_read
This commit is contained in:
@@ -45,6 +45,9 @@
|
||||
#define USER_STACK_PAGES 16 // 16*4096 = 64kb
|
||||
#define USER_CODE_START 0x400000 // like linux
|
||||
|
||||
/* fs */
|
||||
#define CALYXFS_FILES_MAX 10
|
||||
|
||||
/* paging */
|
||||
#define PAGING_MAX_PHYS 0x200000000
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* @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
|
||||
@@ -13,5 +13,6 @@ char *strcpy(char *dest, const char *src);
|
||||
char *strcat(char *dest, const char *src);
|
||||
void strncpy(char* dst, const char* src, size_t n);
|
||||
int strncmp(const char* s1, const char* s2, size_t n);
|
||||
size_t strlen(const char *str);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user