Skip to content

Commit

Permalink
docs: update partition type to use enum
Browse files Browse the repository at this point in the history
  • Loading branch information
swysocki committed Sep 11, 2022
1 parent 5259629 commit bf5ddbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This is useful for creating a disk image on SD Cards or embedded devices.
```python

from gpt_image.disk import Disk
from gpt_image.partition import Partition
from gpt_image.partition import Partition, PartitionType

# create a new, 16 MB disk, size is in bytes
disk = Disk("disk-image.raw")
Expand All @@ -27,15 +27,15 @@ disk.create(16 * 1024 * 1024)
boot_part = Partition(
"boot",
2 * 1024 * 1024,
Partition.EFI_SYSTEM_PARTITION
PartitionType.EFI_SYSTEM_PARTITION.value
)
disk.table.partitions.add(boot_part)

# create an 8MB Linux partition named "data"
data_part = Partition(
"data",
8 * 1024 * 1024,
Partition.LINUX_FILE_SYSTEM
PartitionType.LINUX_FILE_SYSTEM.value
)
disk.table.partitions.add(data_part)

Expand Down

0 comments on commit bf5ddbc

Please sign in to comment.