-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc_cramfs.pyi
More file actions
96 lines (91 loc) · 3.68 KB
/
c_cramfs.pyi
File metadata and controls
96 lines (91 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Generated by cstruct-stubgen
from typing import BinaryIO, Literal, TypeAlias, overload
import dissect.cstruct as __cs__
class _c_cramfs(__cs__.cstruct):
CRAMFS_MAGIC: Literal[684539205] = ...
CRAMFS_SIGNATURE: Literal["Compressed ROMFS"] = ...
CRAMFS_BLOCK_SIZE: Literal[4096] = ...
CRAMFS_MODE_WIDTH: Literal[16] = ...
CRAMFS_UID_WIDTH: Literal[16] = ...
CRAMFS_GID_WIDTH: Literal[8] = ...
CRAMFS_NAMELEN_WIDTH: Literal[6] = ...
CRAMFS_OFFSET_WIDTH: Literal[26] = ...
CRAMFS_MAXPATHLEN: Literal[252] = ...
CRAMFS_SIZE_WIDTH: Literal[24] = ...
CRAMFS_FLAG_FSID_VERSION_2: Literal[1] = ...
CRAMFS_FLAG_SORTED_DIRS: Literal[2] = ...
CRAMFS_FLAG_HOLES: Literal[256] = ...
CRAMFS_FLAG_WRONG_SIGNATURE: Literal[512] = ...
CRAMFS_FLAG_SHIFTED_ROOT_OFFSET: Literal[1024] = ...
CRAMFS_FLAG_BLKSZ_MASK: Literal[14336] = ...
CRAMFS_FLAG_COMP_METHOD_MASK: Literal[49152] = ...
CRAMFS_FLAG_EXT_BLOCK_POINTERS: Literal[2048] = ...
CRAMFS_FLAG_DIRECT_POINTER: Literal[1073741824] = ...
CRAMFS_FLAG_UNCOMPRESSED_BLOCK: Literal[2147483648] = ...
CRAMFS_FLAG_BLKSZ_SHIFT: Literal[11] = ...
CRAMFS_FLAG_COMP_METHOD_SHIFT: Literal[14] = ...
CRAMFS_FLAG_COMP_METHOD_NONE: Literal[0] = ...
CRAMFS_FLAG_COMP_METHOD_GZIP: Literal[1] = ...
CRAMFS_FLAG_COMP_METHOD_LZMA: Literal[2] = ...
CRAMFS_SUPPORTED_FLAGS: Literal[65535] = ...
class cramfs_inode(__cs__.Structure):
mode: _c_cramfs.uint32
uid: _c_cramfs.uint32
size: _c_cramfs.uint32
gid: _c_cramfs.uint32
namelen: _c_cramfs.uint32
offset: _c_cramfs.uint32
name: __cs__.CharArray
@overload
def __init__(
self,
mode: _c_cramfs.uint32 | None = ...,
uid: _c_cramfs.uint32 | None = ...,
size: _c_cramfs.uint32 | None = ...,
gid: _c_cramfs.uint32 | None = ...,
namelen: _c_cramfs.uint32 | None = ...,
offset: _c_cramfs.uint32 | None = ...,
name: __cs__.CharArray | None = ...,
): ...
@overload
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
class cramfs_info(__cs__.Structure):
crc: _c_cramfs.uint32
edition: _c_cramfs.uint32
blocks: _c_cramfs.uint32
files: _c_cramfs.uint32
@overload
def __init__(
self,
crc: _c_cramfs.uint32 | None = ...,
edition: _c_cramfs.uint32 | None = ...,
blocks: _c_cramfs.uint32 | None = ...,
files: _c_cramfs.uint32 | None = ...,
): ...
@overload
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
class cramfs_super_block(__cs__.Structure):
magic: _c_cramfs.uint32
size: _c_cramfs.uint32
flags: _c_cramfs.uint32
future: _c_cramfs.uint32
signature: __cs__.CharArray
fsid: _c_cramfs.cramfs_info
name: __cs__.CharArray
root: _c_cramfs.cramfs_inode
@overload
def __init__(
self,
magic: _c_cramfs.uint32 | None = ...,
size: _c_cramfs.uint32 | None = ...,
flags: _c_cramfs.uint32 | None = ...,
future: _c_cramfs.uint32 | None = ...,
signature: __cs__.CharArray | None = ...,
fsid: _c_cramfs.cramfs_info | None = ...,
name: __cs__.CharArray | None = ...,
root: _c_cramfs.cramfs_inode | None = ...,
): ...
@overload
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
# Technically `c_cramfs` is an instance of `_c_cramfs`, but then we can't use it in type hints
c_cramfs: TypeAlias = _c_cramfs