crash.subsystem.filesystem package

crash.subsystem.filesystem.for_each_super_block() Iterable[Value][source]

Iterate over the list of super blocks and yield each one.

Yields:

gdb.Value – One value for each super block. Each value will be of type struct super_block.

Raises:

gdb.NotAvailableError – The target value was not available.

crash.subsystem.filesystem.get_super_block(desc: int | str | Value, force: bool = False) Value[source]

Given an address description return a gdb.Value that contains a struct super_block at that address.

Parameters:
  • desc – The address for which to provide a casted pointer. The address may be specified using an existing Value, an integer address, or a hexadecimal address represented as a 0x-prefixed string.

  • force – Skip testing whether the value is available.

Returns:

The super block at the requested location. The value will be struct super_block.

Return type:

gdb.Value

Raises:

gdb.NotAvailableError – The target value was not available.

crash.subsystem.filesystem.is_fstype_inode(inode: Value, name: str) bool[source]

Tests whether the inode belongs to a particular file system type.

Parameters:
  • inode – The struct inode to test. The value must be of type struct inode.

  • name – The name of the file system type

Returns:

whether the inode belongs to the specified file system

Return type:

bool

Raises:

gdb.NotAvailableError – The target value was not available.

crash.subsystem.filesystem.is_fstype_super(super_block: Value, name: str) bool[source]

Tests whether the super_block belongs to a particular file system type.

This uses a naive string comparison so modules are not required.

Parameters:
  • super_block – The struct super_block to test. The value must be of type struct super_block.

  • name – The name of the file system type

Returns:

whether the struct super_block belongs to the specified file system

Return type:

bool

Raises:

gdb.NotAvailableError – The target value was not available.

crash.subsystem.filesystem.super_flags(sb: Value) str[source]

Returns the flags associated with the given superblock.

Parameters:

sb – The struct super_block for which to return the flags. The value must be of type struct super_block.

Returns:

The flags field in human-readable form.

Return type:

str

Raises:

gdb.NotAvailableError – The target value was not available.

crash.subsystem.filesystem.super_fstype(sb: Value) str[source]

Returns the file system type’s name for a given superblock.

Parameters:

sb – The struct super_block for which to return the file system type’s name. The value must be of type struct super_block.

Returns:

The file system type’s name

Return type:

str

Raises:

gdb.NotAvailableError – The target value was not available.

Submodules