vfs: check userland buffers before reading them.
[haiku.git] / src / system / boot / loader / file_systems / tarfs / tarfs.h
blob997ee1ef9591843c786cc2745d358960acde0c2e
1 /*
2 * Copyright 2005, Ingo Weinhold, bonefish@cs.tu-berlin.de. All rights reserved.
3 * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
5 * Distributed under the terms of the MIT License.
6 */
7 #ifndef TAR_FS_H
8 #define TAR_FS_H
11 enum {
12 BLOCK_SIZE = 512,
15 struct tar_header {
16 char name[100];
17 char mode[8];
18 char uid[8];
19 char gid[8];
20 char size[12];
21 char modification_time[12];
22 char check_sum[8];
23 char type;
24 char linkname[100];
25 char magic[6];
26 char version[2];
27 char user_name[32];
28 char group_name[32];
29 char device_major[8];
30 char device_minor[8];
31 char prefix[155];
34 static const char *kTarHeaderMagic = "ustar";
35 static const char *kOldTarHeaderMagic = "ustar ";
37 // the relevant entry types
38 enum {
39 TAR_FILE = '0',
40 TAR_FILE2 = '\0',
41 TAR_SYMLINK = '2',
42 TAR_DIRECTORY = '5',
43 TAR_LONG_NAME = 'L',
46 #endif // TAR_FS_H