karlos/include/tar.h
2025-11-27 03:10:24 +01:00

25 lines
509 B
C

#ifndef KARLOS_TAR_H
#define KARLOS_TAR_H
#include <stdint.h>
struct tar_header {
char *name;
uint8_t UNUSED_mode_owner;
uint8_t UNUSED_mode_group;
uint16_t UNUSED_owner_id;
uint16_t UNUSED_group_id;
uint64_t size;
uint64_t UNUSED_mtime;
uint64_t UNUSED_checksum;
#define TAR_LINK_HARD 1
#define TAR_LINK_SYM 2
uint8_t link_indicator;
char *link_name;
void *data;
char *cur;
};
int tar_get_file(const char *name, struct tar_header *hd_out);
#endif