Commit graph

6 commits

Author SHA1 Message Date
electrikmilk
a5cef2c41a Base: Add Icon for Partition Editor
This adds a 16x16 and 32x32 icon that is missing for the Partition
Editor.
2022-08-14 00:52:56 +01:00
Samuel Bowman
fadd69263a PartitionEditor: Add size column 2022-07-21 20:13:44 +01:00
Samuel Bowman
ba9f60785b PartitionEditor: Add total blocks column 2022-07-21 20:13:44 +01:00
Samuel Bowman
2f8c20816e LibPartition: Fix end block off by one error
Previously, end block was inconsistent. GUIDPartitionTable treated
end block as an inclusive bound, while MBRPartitionTable and
EBRPartitionTable treated end block as an exclusive bound.
Now all three treat end block as an inclusive upper bound.
2022-07-21 20:13:44 +01:00
Samuel Bowman
fb4221ad52 PartitionEditor: Abort and show a dialog if not running as root 2022-07-21 20:13:44 +01:00
Samuel Bowman
7a8953a833 PartitionEditor: Add the beginnings of a partition editor :^)
This adds a new application PartitionEditor which will eventually be
used to create and edit partition tables. Since LibPartition does not
know how to write partition tables yet, it is currently read-only.

Devices are discovered by scanning /dev for block device files.
Since block devices are chmod 600, PartitionEditor be must run as root.

By default Serenity uses the entire disk for the ext2 filesystem
without a partition table. This isn't useful for testing as the
partition list for the default disk will be empty. To test properly,
I created a few disk images using various partitioning schemes
(MBR, EBR, and GPT) and attached them using the following command:

export SERENITY_EXTRA_QEMU_ARGS="
  -drive file=/path/to/mbr.img,format=raw,index=1,media=disk
  -drive file=/path/to/ebr.img,format=raw,index=2,media=disk
  -drive file=/path/to/gpt.img,format=raw,index=3,media=disk"
2022-07-21 20:13:44 +01:00