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
38
typedef
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];
46
char
typeflag
;
47
char
linkname
[100];
48
char
ustar
[6];
49
char
ustar_version
[2];
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
58
static_assert
(
sizeof
(TarHeader) == 512,
""
);
59
60
#endif
// __KERNEL__LIBK__FS__TAR_H_
__attribute__
typedef __attribute__
Definition
msi.c:47
__attribute__::checksum
char checksum[8]
Definition
tar.h:45
__attribute__::uid
char uid[8]
Definition
tar.h:41
__attribute__::size
char size[12]
Definition
tar.h:43
__attribute__::linkname
char linkname[100]
Definition
tar.h:47
__attribute__::filename
char filename[100]
Definition
tar.h:39
__attribute__::ustar
char ustar[6]
Definition
tar.h:48
__attribute__::owner_user
char owner_user[32]
Definition
tar.h:50
__attribute__::gid
char gid[8]
Definition
tar.h:42
__attribute__::dev_major
char dev_major[8]
Definition
tar.h:52
__attribute__::filename_prefix
char filename_prefix[155]
Definition
tar.h:54
__attribute__::mode
char mode[8]
Definition
tar.h:40
__attribute__::owner_group
char owner_group[32]
Definition
tar.h:51
__attribute__::dev_minor
char dev_minor[8]
Definition
tar.h:53
__attribute__::_padding
char _padding[12]
Definition
tar.h:55
__attribute__::ustar_version
char ustar_version[2]
Definition
tar.h:49
__attribute__::typeflag
char typeflag
Definition
tar.h:46
__attribute__::mtime
char mtime[12]
Definition
tar.h:44
kernel
libk
fs
tar.h
Generated on Sat May 30 2026 11:09:57 for Voxia OS by
1.13.2