Go to file
Jose M. Guisado 7271bc99db partition: add *_follow_default optional params
Add optional parameters inside init function of partition. Optional
parameters refer to:

- partno_follow_default
- start_follow_default
- end_follow_default

These options can be used in order to enable or disable default partno,
start and end value when adding partitions.

With those optional parameters enabled by default a user is able
to add a partition into the context label without specifying any
attribute.

>>> import fdisk
>>> cxt = fdisk.Context('./disk.bin', readonly=False)
>>> cxt.create_disklabel('gpt')
>>> pa = fdisk.Partition()
>>> cxt.add_partition(pa)

This enables:

- "Filling" the rest of the disk with last partition
- No need to track start/end sector for any following partition
- No need to track next partno number for any following partition

See:

https://cdn.kernel.org/pub/linux/utils/util-linux/v2.34/libfdisk-docs/libfdisk-Partition.html#fdisk-partition-partno-follow-default
https://cdn.kernel.org/pub/linux/utils/util-linux/v2.34/libfdisk-docs/libfdisk-Partition.html#fdisk-partition-start-follow-default
https://cdn.kernel.org/pub/linux/utils/util-linux/v2.34/libfdisk-docs/libfdisk-Partition.html#fdisk-partition-end-follow-default
2022-12-15 17:36:57 +01:00
.gitignore Initial commit 2022-04-06 12:56:11 +02:00
COPYING Add COPYING and license headers 2022-04-07 17:03:34 +02:00
MANIFEST.in Add MANIFEST.in 2022-04-06 15:40:31 +02:00
context.c context: add add_partition method 2022-12-15 12:27:35 +01:00
fdisk.c fdisk.c: add partition module object 2022-04-26 17:08:49 +02:00
fdisk.h fdisk.c: add partition module object 2022-04-26 17:08:49 +02:00
label.c Use c99 struct initialization 2022-04-28 15:47:55 +02:00
partition.c partition: add *_follow_default optional params 2022-12-15 17:36:57 +01:00
setup.py Initial commit 2022-04-06 12:56:11 +02:00