Skip to content

Commit b781de7

Browse files
committed
blockdev: Remove deprecated types and functions
Remove the old partition table types and functions that have been replaced by the unified Device API: - Remove SfDiskOutput, Partition, PartitionType, PartitionTable types - Remove partitions_of() function (use list_dev() + Device methods) - Remove find_parent_devices() function (use Device::list_parents/root_disk) - Remove split_lsblk_line() helper (no longer needed without --pairs) - Remove ESP_ID_MBR constant (MBR ESP support via type codes removed) - Remove regex dependency (was only used by split_lsblk_line) The new Device API provides equivalent functionality: - Device::find_partition_of_type() replaces PartitionTable::find_partition_of_type() - Device::find_partition_of_esp() replaces PartitionTable::find_partition_of_esp() - Device::find_device_by_partno() replaces PartitionTable::find_partno() - Device::root_disk() replaces find_parent_devices() loop pattern Also adds node() as an alias for path() for compatibility, and updates tests to verify the new Device methods. Assisted-by: Claude Code (claude-opus-4-5-20251101) Signed-off-by: ckyrouac <ckyrouac@redhat.com>
1 parent 26203a1 commit b781de7

File tree

3 files changed

+16
-341
lines changed

3 files changed

+16
-341
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/blockdev/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ camino = { workspace = true, features = ["serde1"] }
1717
cap-std-ext = { workspace = true, features = ["fs_utf8"] }
1818
fn-error-context = { workspace = true }
1919
libc = { workspace = true }
20-
regex = { workspace = true }
2120
rustix = { workspace = true }
2221
serde = { workspace = true, features = ["derive"] }
2322
serde_json = { workspace = true }

0 commit comments

Comments
 (0)