minitar/src/tar.h

41 lines
692 B
C
Raw Normal View History

/*
* Copyright (c) 2022-2023, apio.
*
* SPDX-License-Identifier: BSD-2-Clause
*
* tar.h: tar header structure.
*/
2022-11-05 19:10:48 +00:00
#ifndef MINITAR_TAR_H
#define MINITAR_TAR_H
2022-11-23 19:52:18 +00:00
// Format of a raw standard tar header.
#pragma pack(push, 1)
2022-11-06 10:02:26 +00:00
struct tar_header
{
char name[100];
char mode[8];
char uid[8];
char gid[8];
char size[12];
char mtime[12];
char chksum[8];
char typeflag;
char linkname[100];
char magic[6];
char version[2];
char uname[32];
char gname[32];
char devmajor[8];
char devminor[8];
char prefix[155];
2022-11-23 19:52:18 +00:00
char padding[12]; // Not part of the header, only used to make the structure 512 bytes
};
#pragma pack(pop)
2022-11-05 19:10:48 +00:00
#endif