Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
tar.h
Go to the documentation of this file.
1/*
2 BSD 3-Clause License
3
4 Copyright (c) 2023, Mohammad Arfan
5 All rights reserved.
6
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9
10 1. Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12
13 2. Redistributions in binary form must reproduce the above copyright notice,
14 this list of conditions and the following disclaimer in the documentation
15 and/or other materials provided with the distribution.
16
17 3. Neither the name of the copyright holder nor the names of its
18 contributors may be used to endorse or promote products derived from
19 this software without specific prior written permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 POSSIBILITY OF SUCH DAMAGE.
32*/
33
34#ifndef __KERNEL__LIBK__FS__TAR_H_
35#define __KERNEL__LIBK__FS__TAR_H_
36
37// This is a struct for the tar header
38typedef struct {
39 char filename[100];
40 char mode[8];
41 char uid[8];
42 char gid[8];
43 char size[12];
44 char mtime[12];
45 char checksum[8];
47 char linkname[100];
48 char ustar[6];
50 char owner_user[32];
51 char owner_group[32];
52 char dev_major[8];
53 char dev_minor[8];
54 char filename_prefix[155];
55 char _padding[12]; /* <-- tambah ini biar tepat 512 */
56} __attribute__((packed)) TarHeader;
57
58static_assert(sizeof(TarHeader) == 512, "");
59
60#endif // __KERNEL__LIBK__FS__TAR_H_
typedef __attribute__
Definition msi.c:47
char checksum[8]
Definition tar.h:45
char uid[8]
Definition tar.h:41
char size[12]
Definition tar.h:43
char linkname[100]
Definition tar.h:47
char filename[100]
Definition tar.h:39
char ustar[6]
Definition tar.h:48
char owner_user[32]
Definition tar.h:50
char gid[8]
Definition tar.h:42
char dev_major[8]
Definition tar.h:52
char filename_prefix[155]
Definition tar.h:54
char mode[8]
Definition tar.h:40
char owner_group[32]
Definition tar.h:51
char dev_minor[8]
Definition tar.h:53
char _padding[12]
Definition tar.h:55
char ustar_version[2]
Definition tar.h:49
char typeflag
Definition tar.h:46
char mtime[12]
Definition tar.h:44