summaryrefslogtreecommitdiffstats
path: root/fdisks/fdisk.h
Commit message (Collapse)AuthorAgeFilesLines
...
* fdisk: add fdisk_set_partition_type()Karel Zak2012-09-271-1/+4
| | | | | | | | - remove all label specific partition type stuff from fdisk.c to label files - add new fdisk_set_partition_type() to API Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add fdisk_get_partition_type()Karel Zak2012-09-271-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add new functions for work with fdisk_parttypeKarel Zak2012-09-271-2/+24
| | | | | | | | | | - add flags to fdisk_parttype to store more information about the types - function for conversion from code to fdisk_parttype - function for conversion from string to fdisk_parttype - function for conversion from user input to fdisk_parttype - support for unknown complex types (e.g. unknown UUIDs) Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: improve list partition typesKarel Zak2012-09-271-2/+3
| | | | | | | - add fdisk_parttype->typestr for types like GPT UUID or Mac - list typestr if specified Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: move partition types to label specific partKarel Zak2012-09-271-3/+14
| | | | | | | | | | - move MBR partition types to dos_part_types.h - make dos_part_types.h independent on datetypes to keep it useful in all fdisks - add struct fdisk_parrtype - move label specific partition types to context->label Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix menuDavidlohr Bueso2012-07-261-6/+6
| | | | | | | | | | | | | Commit 79c8a145ddff98d9c5bc70e67c5a861f67c50484 changed the numerical values of fdisk_labeltype and broke the menu functionality, mixing main and expert menus. Revert this change along with the label comment regarding it matching labeltype. This is no longer valid since the original patch that lead to this modification assumed that __probe_labels() would use these indices when creating a default DOS/SUN disklabel, see http://www.spinics.net/lists/util-linux-ng/msg06509.html Reported-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* fdisk: make grain global variable part of fdisk_context()Petr Uzel2012-07-261-1/+2
| | | | | | | | There is no reason for this to be global variable - it belongs to the context. Signed-off-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: remove unused variablesKarel Zak2012-07-241-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: API: add fdisk_label_changeDavidlohr Bueso2012-07-241-1/+3
| | | | | | | | [kzak@redhat.com: - rename function - remove fdisk_create_default_disklabel()] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* fdisk: API: add verify to label operationsDavidlohr Bueso2012-07-241-0/+8
| | | | | | | [kzak@redhat.com: - rename some functions] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: API: add new partition to label operationsDavidlohr Bueso2012-07-241-0/+3
| | | | | Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* fdisk: API: add write to label operationsDavidlohr Bueso2012-07-241-7/+3Star
| | | | | | | | [kzak@redhat.com: - rename functions - use errno] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* fdisk: API: add delete partition to label operationsDavidlohr Bueso2012-07-231-0/+3
| | | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: API: add to label operations to contextDavidlohr Bueso2012-07-231-8/+16
| | | | | | | | | | | The context structure is the fdisk API's main data type as it keeps all data together. Add the label structure to it, so that the pt-specific operations can be called from the context. [kzak@redhat.com: - merge with latest changes - don't allocate the label, use const pointer] Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* fdisk: rename cxt->mbr buffer to cxt->firstsectorKarel Zak2012-07-231-2/+2
| | | | | | | MBR is regular name for DOS partition table, let use less confusing name for the buffer. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: move label specific stuff to fdiskdoslabel.cKarel Zak2012-07-231-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: move DOS geometry code from generic part to label specificKarel Zak2012-07-231-2/+0Star
| | | | | | get_partition_table_geometry() should be called from DOS code Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: get_boot() has to die (step I.)Karel Zak2012-07-231-0/+2
| | | | | | - move generic stuff around "create disklabel" operation to API Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: move user geometry setting from fdisk.c to APIKarel Zak2012-07-231-1/+4
| | | | | | | - to avoid duplicate code - to remove fdisk_geom_set_cyls() from API Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: API: add label probing functionalityDavidlohr Bueso2012-07-161-0/+19
| | | | | | | | | | | | | | | | This patch sets the initial layout for label specific operations. A new fdisk_label structure is created that will hold all these ops, like new, delete, write and probe, among others. For now only probing is implemented. Once this design is established, a copy of the probed label will be copied to the main context structure, where calling the specific functions will save 'disklabel' checks. Debugging support is added as well. This patch passes regression tests and manually passes bsd, sun, dos and sgi labels probes. Reviewed-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* build-sys: rename fdisk -> fdisks/, convert to moduleKarel Zak2012-06-261-0/+253
Signed-off-by: Karel Zak <kzak@redhat.com>