From 99eb87075d954f14cc108618456b9d7aea9233ac Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 11 May 2026 14:42:51 -0600 Subject: [PATCH 1/5] Fix #25 --- ext4/block.py | 11 ++++++++++- ext4/blockdescriptor.py | 2 ++ ext4/directory.py | 7 +++++++ ext4/extent.py | 13 +++++++++++++ ext4/htree.py | 16 ++++++++++++++++ ext4/inode.py | 23 ++++++++++++++++++----- ext4/struct.py | 2 ++ ext4/superblock.py | 2 ++ ext4/volume.py | 16 ++++++++++++++++ ext4/xattr.py | 12 +++++++++++- test.py | 2 +- 11 files changed, 98 insertions(+), 8 deletions(-) diff --git a/ext4/block.py b/ext4/block.py index 03c7e17..fa5839c 100644 --- a/ext4/block.py +++ b/ext4/block.py @@ -1,7 +1,10 @@ import errno import io import os -from typing import TYPE_CHECKING +from typing import ( + TYPE_CHECKING, + final, +) from ._compat import override @@ -11,7 +14,10 @@ from .volume import Volume +@final class BlockIOBlocks: + __slots__ = ("blockio", "_null_block") + def __init__(self, blockio: "BlockIO") -> None: self.blockio: BlockIO = blockio self._null_block: bytearray = bytearray(self.block_size) @@ -41,7 +47,10 @@ def __getitem__(self, ee_block: int) -> bytearray | bytes: return self._null_block +@final class BlockIO(io.RawIOBase): + __slots__ = ("inode", "cursor", "blocks") + def __init__(self, inode: "Inode") -> None: super().__init__() self.inode: Inode = inode diff --git a/ext4/blockdescriptor.py b/ext4/blockdescriptor.py index 705f979..af449e6 100644 --- a/ext4/blockdescriptor.py +++ b/ext4/blockdescriptor.py @@ -21,6 +21,8 @@ @final class BlockDescriptor(Ext4Struct): + __slots__ = ("bg_no",) + _pack_ = 1 # _anonymous_ = ("bg_reserved",) _fields_ = [ diff --git a/ext4/directory.py b/ext4/directory.py index f9f5511..be825d8 100644 --- a/ext4/directory.py +++ b/ext4/directory.py @@ -28,6 +28,8 @@ class DirectoryEntryStruct(Ext4Struct): + __slots__: tuple[str, ...] = ("directory",) + def __init__(self, directory: "Directory", offset: int) -> None: self.directory: Directory = directory super().__init__(directory.volume, offset) @@ -39,6 +41,7 @@ def read_from_volume(self) -> None: class DirectoryEntryBase(DirectoryEntryStruct): + __slots__: tuple[str, ...] = () @property def name_bytes(self) -> bytes: return bytes(self.name)[: self.name_len] # pyright: ignore[reportAny] @@ -55,6 +58,7 @@ def is_fake_entry(self) -> bool: @final class DirectoryEntry(DirectoryEntryBase): + __slots__ = () _pack_ = 1 # _anonymous_ = ("l_i_reserved",) _fields_ = [ @@ -67,6 +71,7 @@ class DirectoryEntry(DirectoryEntryBase): @final class DirectoryEntry2(DirectoryEntryBase): + __slots__ = () _pack_ = 1 # _anonymous_ = ("l_i_reserved",) _fields_ = [ @@ -85,6 +90,7 @@ def is_fake_entry(self) -> bool: @final class DirectoryEntryTail(DirectoryEntryStruct): + __slots__ = () _pack_ = 1 # _anonymous_ = ("det_reserved_zero1", "det_reserved_zero2",) _fields_ = [ @@ -107,6 +113,7 @@ def expected_magic(self) -> int: @final class DirectoryEntryHash(DirectoryEntryStruct): + __slots__ = () _pack_ = 1 # _anonymous_ = ("det_reserved_zero1", "det_reserved_zero2",) _fields_ = [ diff --git a/ext4/extent.py b/ext4/extent.py index 148f4f6..64700ac 100644 --- a/ext4/extent.py +++ b/ext4/extent.py @@ -20,7 +20,10 @@ from .volume import Volume +@final class ExtentBlocks: + __slots__: tuple[str, ...] = ("extent", "_null_block") + def __init__(self, extent: "Extent") -> None: self.extent: Extent = extent self._null_block: bytearray = bytearray(self.block_size) @@ -74,6 +77,8 @@ def __len__(self) -> int: @final class ExtentHeader(Ext4Struct): + __slots__ = ("tree", "indices", "extents", "tail") + _pack_ = 1 # _anonymous_ = () _fields_ = [ @@ -153,6 +158,8 @@ def checksum(self) -> int | None: @final class ExtentIndex(Ext4Struct): + __slots__ = ("ei_no", "header") + _pack_ = 1 # _anonymous_ = ("ei_unused",) _fields_ = [ @@ -184,6 +191,8 @@ def inode(self) -> "Inode": @final class Extent(Ext4Struct): + __slots__ = ("ee_no", "header", "blocks") + _pack_ = 1 # _anonymous_ = ("ei_unused",) _fields_ = [ @@ -231,6 +240,8 @@ def read(self) -> bytes: @final class ExtentTail(Ext4Struct): + __slots__ = ("header",) + _pack_ = 1 _fields_ = [ ("et_checksum", c_uint32), @@ -250,6 +261,8 @@ def inode(self) -> "Inode": class ExtentTree: + __slots__: tuple[str, ...] = ("inode", "headers") + def __init__(self, inode: "Inode") -> None: self.inode: Inode = inode self.headers: list[ExtentHeader] = [] diff --git a/ext4/htree.py b/ext4/htree.py index b39d925..2177bc8 100644 --- a/ext4/htree.py +++ b/ext4/htree.py @@ -31,6 +31,8 @@ class LittleEndianStructureWithVolume(LittleEndianStructure): + __slots__: tuple[str, ...] = ("_volume",) + def __init__(self) -> None: super().__init__() self._volume: Volume | None = None @@ -47,6 +49,8 @@ def volume(self, volume: "Volume") -> None: @final class DotDirectoryEntry2(LittleEndianStructureWithVolume): + __slots__ = () + _pack_ = 1 # _anonymous_ = () _fields_ = [ @@ -88,6 +92,8 @@ class DXRootInfo(LittleEndianStructure): class DXBase(Ext4Struct): + __slots__: tuple[str, ...] = ("directory",) + def __init__(self, directory: "Directory", offset: int) -> None: self.directory: Directory = directory super().__init__(directory.volume, offset) @@ -102,6 +108,8 @@ def read_from_volume(self) -> None: @final class DXEntry(DXBase): + __slots__ = ("index", "parent") + _pack_ = 1 # _anonymous_ = ("") _fields_ = [ @@ -119,6 +127,8 @@ def __init__(self, parent: "DXEntriesBase", index: int) -> None: class DXEntriesBase(DXBase): + __slots__: tuple[str, ...] = () + @override def read_from_volume(self) -> None: super().read_from_volume() @@ -141,6 +151,8 @@ def info_length(self) -> int: @final class DXRoot(DXEntriesBase): + __slots__ = () + _pack_ = 1 # _anonymous_ = ("") _fields_ = [ @@ -178,6 +190,8 @@ def magic(self) -> int: @final class DXNode(DXEntriesBase): + __slots__ = () + _pack_ = 1 # _anonymous_ = ("") _fields_ = [ @@ -196,6 +210,8 @@ def __init__(self, directory: "Directory", offset: int) -> None: @final class DXTail(DXBase): + __slots__ = ("parent",) + _pack_ = 1 # _anonymous_ = ("dt_reserved") _fields_ = [ diff --git a/ext4/inode.py b/ext4/inode.py index a6a8e0d..c232d80 100644 --- a/ext4/inode.py +++ b/ext4/inode.py @@ -162,6 +162,7 @@ class Osd2(LittleEndianUnion): class Inode(Ext4Struct): EXT4_GOOD_OLD_INODE_SIZE: int = 128 EXT2_GOOD_OLD_INODE_SIZE: int = 128 + __slots__: tuple[str, ...] = ("i_no", "tree") _pack_ = 1 # pyright: ignore[reportUnannotatedClassAttribute] _fields_ = [ # pyright: ignore[reportUnannotatedClassAttribute] ("i_mode", MODE.basetype), @@ -451,26 +452,32 @@ def xattrs( raise +@final class UnknownInode(Inode): - pass + __slots__ = () +@final class Fifo(Inode): - pass + __slots__ = () +@final class CharacterDevice(Inode): - pass + __slots__ = () +@final class BlockDevice(Inode): - pass + __slots__ = () +@final class Socket(Inode): - pass + __slots__ = () +@final class File(Inode): @override def open( @@ -479,7 +486,10 @@ def open( return self._open(mode, encoding, newline) +@final class SymbolicLink(Inode): + __slots__ = () + @property def is_fast_symlink(self) -> bool: i_blocks_lo = assert_cast(self.i_blocks_lo, int) # pyright: ignore[reportAny] @@ -498,7 +508,10 @@ def readlink(self) -> bytes: return self.volume.read(self.i_size) +@final class Directory(Inode): + __slots__ = ("_inode_at_cache", "_dirents", "htree") + def __init__(self, volume: Volume, offset: int, i_no: int) -> None: super().__init__(volume, offset, i_no) self._inode_at_cache: LRUCache[str | bytes, Inode] = LRUCache(maxsize=32) diff --git a/ext4/struct.py b/ext4/struct.py index 1b80648..501981f 100644 --- a/ext4/struct.py +++ b/ext4/struct.py @@ -74,6 +74,8 @@ def to_hex(data: int | list[int] | bytes | None) -> str: class Ext4Struct(LittleEndianStructure): + __slots__: tuple[str, ...] = ("volume", "offset") + def __init__(self, volume: "Volume", offset: int) -> None: super().__init__() self.volume: Volume = volume diff --git a/ext4/superblock.py b/ext4/superblock.py index f63fc61..572c53f 100644 --- a/ext4/superblock.py +++ b/ext4/superblock.py @@ -37,6 +37,8 @@ @final class Superblock(Ext4Struct): + __slots__ = () + _pack_ = 1 # _anonymous_ = ( # "s_reserved_pad", diff --git a/ext4/volume.py b/ext4/volume.py index 908958a..38e081f 100644 --- a/ext4/volume.py +++ b/ext4/volume.py @@ -29,6 +29,8 @@ class InvalidStreamException(Exception): class Inodes: + __slots__: tuple[str, ...] = ("volume", "_group_cache", "_offset_cache", "_getitem_cache") + def __init__(self, volume: Volume) -> None: self.volume: Volume = volume self._group_cache: dict[int, tuple[int, int]] = {} @@ -66,6 +68,20 @@ def __getitem__(self, index: int) -> Inode: class Volume: + __slots__: tuple[str, ...] = ( + "stream", + "offset", + "cursor", + "ignore_flags", + "ignore_magic", + "ignore_checksum", + "ignore_attr_name_index", + "superblock", + "group_descriptors", + "inodes", + "_inode_at_cache", + ) + def __init__( self, stream: PeekableStream, diff --git a/ext4/xattr.py b/ext4/xattr.py index 15bbb68..2ca75f8 100644 --- a/ext4/xattr.py +++ b/ext4/xattr.py @@ -33,6 +33,8 @@ class ExtendedAttributeError(Exception): class ExtendedAttributeBase(Ext4Struct): + __slots__: tuple[str, ...] = ("inode", "data_size") + def __init__(self, inode: "Inode", offset: int, size: int) -> None: self.inode: Inode = inode self.data_size: int = size @@ -40,6 +42,7 @@ def __init__(self, inode: "Inode", offset: int, size: int) -> None: class ExtendedAttributeIBodyHeader(ExtendedAttributeBase): + __slots__: tuple[str, ...] = () _pack_ = 1 # pyright: ignore[reportUnannotatedClassAttribute] # _anonymous_ = () _fields_ = [ # pyright: ignore[reportUnannotatedClassAttribute] @@ -106,6 +109,7 @@ def __iter__(self) -> Generator[tuple[str, bytes], None, None]: @final class ExtendedAttributeHeader(ExtendedAttributeIBodyHeader): + __slots__ = () _pack_ = 1 # _anonymous_ = ("h_reserved) _fields_ = [ @@ -154,6 +158,8 @@ def checksum(self) -> int | None: @final class ExtendedAttributeEntry(ExtendedAttributeBase): + __slots__: tuple[str, ...] = ("e_name",) + NAME_INDICES = [ "", "user.", @@ -177,11 +183,15 @@ class ExtendedAttributeEntry(ExtendedAttributeBase): # ("e_name", c_char * self.e_name_len), ] + def __init__(self, inode: "Inode", offset: int, size: int) -> None: + self.e_name: bytes = b"" + super().__init__(inode, offset, size) + @override def read_from_volume(self) -> None: super().read_from_volume() e_name_len = assert_cast(self.e_name_len, int) # pyright: ignore[reportAny] - self.e_name: bytes = self.volume.stream.read(e_name_len) # pyright: ignore[reportUninitializedInstanceVariable] + self.e_name = self.volume.stream.read(e_name_len) @ExtendedAttributeBase.size.getter def size(self) -> int: diff --git a/test.py b/test.py index 7c0e1cb..dc4e62a 100644 --- a/test.py +++ b/test.py @@ -164,7 +164,7 @@ def test_root_inode(volume: ext4.Volume) -> None: inode = volume.inode_at(f"/test{i}.txt") attrs = {k: v for k, v in inode.xattrs} for j in range(1, 21): - _assert(f'attrs["user.name{j}"] == b"value{i}_{j}"') + _assert(f'attrs["user.name{j}"] == b"value{i}_{j}"', lambda: attrs) data = inode.open().read() _assert(f'data == b"hello world{i}\\n"') From 435d067f1efd5172c657160565867ab2824a609c Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 11 May 2026 14:44:47 -0600 Subject: [PATCH 2/5] Bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 10b8cd3..440ecf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ext4" -version = "1.3.2" +version = "1.3.3" authors = [ { name="Eeems", email="eeems@eeems.email" }, ] From f42539877ce1827cc0c0226540b403965ea47e0b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 11 May 2026 14:47:58 -0600 Subject: [PATCH 3/5] Force unbuffered --- .github/workflows/build.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 80c01a6..39872f6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,6 +32,8 @@ jobs: run: pip install emake - name: Run lint run: emake lint + env: + PYTHONUNBUFFERED: "1" test-image: name: Generate test ext4 image @@ -49,6 +51,8 @@ jobs: run: | set -e ./_test_image.sh + env: + PYTHONUNBUFFERED: "1" - uses: actions/upload-artifact@v6 with: name: test.ext4 @@ -88,6 +92,8 @@ jobs: - name: Run tests shell: bash run: emake test + env: + PYTHONUNBUFFERED: "1" fuzz: name: Fuzz @@ -112,6 +118,8 @@ jobs: - name: Run test shell: bash run: make fuzz + env: + PYTHONUNBUFFERED: "1" build-sdist: name: Build sdist @@ -125,6 +133,8 @@ jobs: - *install-emake - name: Building sdist run: emake build --sdist + env: + PYTHONUNBUFFERED: "1" - uses: actions/upload-artifact@v6 with: name: pip-sdist @@ -148,6 +158,8 @@ jobs: path: . - name: Test wheel run: emake test --wheel + env: + PYTHONUNBUFFERED: "1" - uses: actions/upload-artifact@v6 with: name: pip-wheel-none-any @@ -188,6 +200,8 @@ jobs: --arch ${{ matrix.arch }} \ --libc ${{ matrix.libc }} \ --python ${{ matrix.python }} + env: + PYTHONUNBUFFERED: "1" - name: Download test.ext4 uses: actions/download-artifact@v8 with: @@ -200,6 +214,8 @@ jobs: --arch ${{ matrix.arch }} \ --libc ${{ matrix.libc }} \ --python ${{ matrix.python }} + env: + PYTHONUNBUFFERED: "1" - uses: actions/upload-artifact@v6 with: name: pip-wheel-${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.libc }} From 77c3c3a689a6df9e663adb05c4c15e5f6074a94c Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 11 May 2026 14:57:56 -0600 Subject: [PATCH 4/5] Review feedback --- ext4/block.py | 11 +++++++++-- ext4/extent.py | 28 +++++++++++++++++++++++----- ext4/htree.py | 5 ++++- ext4/inode.py | 13 +++++++++++-- ext4/struct.py | 5 ++++- ext4/volume.py | 21 +++++++++++++-------- ext4/xattr.py | 5 ++++- 7 files changed, 68 insertions(+), 20 deletions(-) diff --git a/ext4/block.py b/ext4/block.py index fa5839c..fd505ff 100644 --- a/ext4/block.py +++ b/ext4/block.py @@ -16,7 +16,10 @@ @final class BlockIOBlocks: - __slots__ = ("blockio", "_null_block") + __slots__ = ( + "_null_block", + "blockio", + ) def __init__(self, blockio: "BlockIO") -> None: self.blockio: BlockIO = blockio @@ -49,7 +52,11 @@ def __getitem__(self, ee_block: int) -> bytearray | bytes: @final class BlockIO(io.RawIOBase): - __slots__ = ("inode", "cursor", "blocks") + __slots__ = ( + "blocks", + "cursor", + "inode", + ) def __init__(self, inode: "Inode") -> None: super().__init__() diff --git a/ext4/extent.py b/ext4/extent.py index 64700ac..7f4aeeb 100644 --- a/ext4/extent.py +++ b/ext4/extent.py @@ -22,7 +22,10 @@ @final class ExtentBlocks: - __slots__: tuple[str, ...] = ("extent", "_null_block") + __slots__: tuple[str, ...] = ( + "_null_block", + "extent", + ) def __init__(self, extent: "Extent") -> None: self.extent: Extent = extent @@ -77,7 +80,12 @@ def __len__(self) -> int: @final class ExtentHeader(Ext4Struct): - __slots__ = ("tree", "indices", "extents", "tail") + __slots__ = ( + "extents", + "indices", + "tail", + "tree", + ) _pack_ = 1 # _anonymous_ = () @@ -158,7 +166,10 @@ def checksum(self) -> int | None: @final class ExtentIndex(Ext4Struct): - __slots__ = ("ei_no", "header") + __slots__ = ( + "ei_no", + "header", + ) _pack_ = 1 # _anonymous_ = ("ei_unused",) @@ -191,7 +202,11 @@ def inode(self) -> "Inode": @final class Extent(Ext4Struct): - __slots__ = ("ee_no", "header", "blocks") + __slots__ = ( + "blocks", + "ee_no", + "header", + ) _pack_ = 1 # _anonymous_ = ("ei_unused",) @@ -261,7 +276,10 @@ def inode(self) -> "Inode": class ExtentTree: - __slots__: tuple[str, ...] = ("inode", "headers") + __slots__: tuple[str, ...] = ( + "headers", + "inode", + ) def __init__(self, inode: "Inode") -> None: self.inode: Inode = inode diff --git a/ext4/htree.py b/ext4/htree.py index 2177bc8..0565ae0 100644 --- a/ext4/htree.py +++ b/ext4/htree.py @@ -108,7 +108,10 @@ def read_from_volume(self) -> None: @final class DXEntry(DXBase): - __slots__ = ("index", "parent") + __slots__ = ( + "index", + "parent", + ) _pack_ = 1 # _anonymous_ = ("") diff --git a/ext4/inode.py b/ext4/inode.py index c232d80..3f62c26 100644 --- a/ext4/inode.py +++ b/ext4/inode.py @@ -162,7 +162,10 @@ class Osd2(LittleEndianUnion): class Inode(Ext4Struct): EXT4_GOOD_OLD_INODE_SIZE: int = 128 EXT2_GOOD_OLD_INODE_SIZE: int = 128 - __slots__: tuple[str, ...] = ("i_no", "tree") + __slots__: tuple[str, ...] = ( + "i_no", + "tree", + ) _pack_ = 1 # pyright: ignore[reportUnannotatedClassAttribute] _fields_ = [ # pyright: ignore[reportUnannotatedClassAttribute] ("i_mode", MODE.basetype), @@ -479,6 +482,8 @@ class Socket(Inode): @final class File(Inode): + __slots__ = () + @override def open( self, mode: str = "rb", encoding: None = None, newline: None = None @@ -510,7 +515,11 @@ def readlink(self) -> bytes: @final class Directory(Inode): - __slots__ = ("_inode_at_cache", "_dirents", "htree") + __slots__ = ( + "_dirents", + "_inode_at_cache", + "htree", + ) def __init__(self, volume: Volume, offset: int, i_no: int) -> None: super().__init__(volume, offset, i_no) diff --git a/ext4/struct.py b/ext4/struct.py index 501981f..22e6cf9 100644 --- a/ext4/struct.py +++ b/ext4/struct.py @@ -74,7 +74,10 @@ def to_hex(data: int | list[int] | bytes | None) -> str: class Ext4Struct(LittleEndianStructure): - __slots__: tuple[str, ...] = ("volume", "offset") + __slots__: tuple[str, ...] = ( + "offset", + "volume", + ) def __init__(self, volume: "Volume", offset: int) -> None: super().__init__() diff --git a/ext4/volume.py b/ext4/volume.py index 38e081f..bd22269 100644 --- a/ext4/volume.py +++ b/ext4/volume.py @@ -29,7 +29,12 @@ class InvalidStreamException(Exception): class Inodes: - __slots__: tuple[str, ...] = ("volume", "_group_cache", "_offset_cache", "_getitem_cache") + __slots__: tuple[str, ...] = ( + "_getitem_cache", + "_group_cache", + "_offset_cache", + "volume", + ) def __init__(self, volume: Volume) -> None: self.volume: Volume = volume @@ -69,17 +74,17 @@ def __getitem__(self, index: int) -> Inode: class Volume: __slots__: tuple[str, ...] = ( - "stream", - "offset", + "_inode_at_cache", "cursor", + "group_descriptors", + "ignore_attr_name_index", + "ignore_checksum", "ignore_flags", "ignore_magic", - "ignore_checksum", - "ignore_attr_name_index", - "superblock", - "group_descriptors", "inodes", - "_inode_at_cache", + "offset", + "stream", + "superblock", ) def __init__( diff --git a/ext4/xattr.py b/ext4/xattr.py index 2ca75f8..b5fe64f 100644 --- a/ext4/xattr.py +++ b/ext4/xattr.py @@ -33,7 +33,10 @@ class ExtendedAttributeError(Exception): class ExtendedAttributeBase(Ext4Struct): - __slots__: tuple[str, ...] = ("inode", "data_size") + __slots__: tuple[str, ...] = ( + "data_size", + "inode", + ) def __init__(self, inode: "Inode", offset: int, size: int) -> None: self.inode: Inode = inode From 7cc6126b739dce124782a242df2183dc11bf97d3 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 11 May 2026 15:02:47 -0600 Subject: [PATCH 5/5] Add missing __slots__ --- ext4/htree.py | 2 ++ ext4/inode.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/ext4/htree.py b/ext4/htree.py index 0565ae0..bc0676b 100644 --- a/ext4/htree.py +++ b/ext4/htree.py @@ -80,6 +80,7 @@ def verify(self) -> None: @final class DXRootInfo(LittleEndianStructure): + __slots__ = () _pack_ = 1 # _anonymous_ = ("reserved_zero") _fields_ = [ @@ -174,6 +175,7 @@ def __init__(self, inode: "Directory") -> None: @final class DXFake(LittleEndianStructure): + __slots__ = () _pack_ = 1 # _anonymous_ = ("") _fields_ = [ diff --git a/ext4/inode.py b/ext4/inode.py index 3f62c26..0ca8c6d 100644 --- a/ext4/inode.py +++ b/ext4/inode.py @@ -78,6 +78,7 @@ class MalformedInodeError(Exception): @final class Linux1(LittleEndianStructure): + __slots__ = () _pack_ = 1 _fields_ = [ ("l_i_version", c_uint32), @@ -86,6 +87,7 @@ class Linux1(LittleEndianStructure): @final class Hurd1(LittleEndianStructure): + __slots__ = () _pack_ = 1 _fields_ = [ ("h_i_translator", c_uint32), @@ -94,6 +96,7 @@ class Hurd1(LittleEndianStructure): @final class Masix1(LittleEndianStructure): + __slots__ = () _pack_ = 1 # _anonymous_ = ("m_i_reserved1",) _fields_ = [ @@ -103,6 +106,7 @@ class Masix1(LittleEndianStructure): @final class Osd1(LittleEndianUnion): + __slots__ = () _pack_ = 1 _fields_ = [ ("linux1", Linux1), @@ -113,6 +117,7 @@ class Osd1(LittleEndianUnion): @final class Linux2(LittleEndianStructure): + __slots__ = () _pack_ = 1 # _anonymous_ = ("l_i_reserved",) _fields_ = [ @@ -127,6 +132,7 @@ class Linux2(LittleEndianStructure): @final class Hurd2(LittleEndianStructure): + __slots__ = () _pack_ = 1 # _anonymous_ = ("h_i_reserved1",) _fields_ = [ @@ -140,6 +146,7 @@ class Hurd2(LittleEndianStructure): @final class Masix2(LittleEndianStructure): + __slots__ = () _pack_ = 1 # _anonymous_ = ("h_i_reserved1", "m_i_reserved2") _fields_ = [ @@ -151,6 +158,7 @@ class Masix2(LittleEndianStructure): @final class Osd2(LittleEndianUnion): + __slots__ = () _pack_ = 1 _fields_ = [ ("linux2", Linux2),