libfdisk context add_partition function initializes a passed argument
with the new partition's partno.
If add_partition is successful, return its partno.
This method wraps fdisk_add_partition. Allows modifying in-memory
partition table of a given context.
Remember that changes need to be written to disk using the
relevant fdisk_write_disklabel function wrapper.
Adds wrappers for following label related functions from libfdisk:
- fdisk_create_disklabel
- fdisk_write_disklabel
These functions are declared as methods of a Context python object.
Renames 'cval' to 'szunit' for better readability. This variable is used
to store the size_unit constant that is going to be set using
fdisk_set_size_unit.
fdisk_assign_device() contains 'readonly' parameter to indicate how to
open the device.
Assigned device 'readonly' must be false (0) in order to write in-memory
changes to it.