summaryrefslogtreecommitdiff
path: root/libfdisk/src
AgeCommit message (Collapse)AuthorFilesLines
2013-09-16libfdisk: add fdisk_scround()Karel Zak3-1/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (gpt, sun) use fdisk_partname()Karel Zak1-7/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add fdisk_partname()Karel Zak3-1/+86
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add fdisk_context_enable_details()Karel Zak3-2/+29
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add list() label operationKarel Zak4-4/+30
... and use it for GPT Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (gpt) use lib/tt.c to list partitionsKarel Zak1-20/+30
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add new 'ask' type TABLEKarel Zak3-1/+36
The new type could be used to print table-like output (for example list of the partitions). Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-09libfdisk: don't re-allocate range string in Ask APIKarel Zak2-11/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-09libfdisk: do not use va_list in the Ask APIKarel Zak3-30/+9
# fdisk /dev/sda Welcome to fdisk (util-linux 2.23). [...] Command (m for help): a Segmentation fault (core dumped) It's too fragile, the va_list implementation is architecture specific and it seems we need such thing in libfdisk at all. Reported-by: "Gabor Z. Papp" <gzp@papp.hu> Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-26Fix various typosYuri Chornoivan1-1/+1
2013-04-25libfdisk: gpt: remove leftover commentsDavidlohr Bueso1-6/+0
I must have left those in some commit. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2013-04-18libfdisk: (gpt) fix EFI UUID usageKarel Zak1-40/+35
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18libfdisk: (gpt) fix valid_pmbr()Karel Zak1-7/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18libfdisk: (gpt) use le64_to_cpu() for alternative LBA checksKarel Zak1-7/+14
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-09various: fix variable and function declarations [smatch scan]Sami Kerola1-2/+3
disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code fdisks/sfdisk.c:982:5: warning: mixing declarations and code fdisks/sfdisk.c:1254:5: warning: mixing declarations and code fdisks/sfdisk.c:1564:5: warning: mixing declarations and code lib/mbsalign.c:279:7: warning: mixing declarations and code libblkid/src/devname.c:378:17: warning: mixing declarations and code libfdisk/src/alignment.c:219:9: warning: mixing declarations and code term-utils/wall.c:111:9: warning: mixing declarations and code text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks' text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line' text-utils/rev.c:105:9: warning: mixing declarations and code text-utils/tailf.c:245:9: warning: mixing declarations and code Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-08Spelling fixes.Ville Skyttä1-2/+2
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2013-04-03libfdisk: use O_CLOEXECKarel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-27libfdisk: (gpt) fix memory leak [coverity scan]Karel Zak1-1/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-27libfdisk: check returns [coverity scan]Karel Zak1-3/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-20libfdisk: (gpt) rmeove xalloc callsKarel Zak1-3/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-12fdisk: no more AIX "support"Karel Zak4-7/+3
The whole AIX support in fdisk has been limited to pretty poor AIX magic string detection and warning that the AIX is unsupported. It's too expensive to maintain such fdisk driver. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (bsd) support non-nested version tooKarel Zak1-0/+1
note that btrydev() should be unnecessary, regular list_table() should be enough for all types. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add support for nested contextsKarel Zak3-2/+41
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: improve fdisk_ask_partnum()Karel Zak1-9/+32
.. to don't ask is there is only one choice. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add disk_partition_is_used()Karel Zak2-0/+18
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add fdisk_partition_toggle_flag()Karel Zak3-1/+31
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add info about display units to contextKarel Zak3-0/+62
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add Yes/No to Ask APIKarel Zak3-1/+51
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add wrapper to ask for numbersKarel Zak2-0/+44
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (gpt) use fdisk_{warn,warx,info} functionsKarel Zak1-41/+40
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add info, warn and wanx Ask APIKarel Zak3-1/+157
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: extend "ask" API, add support for offsetsKarel Zak4-83/+236
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add "ask" interfaceKarel Zak6-19/+338
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: fix gpt status, don't use xcalloc() in libraryKarel Zak1-13/+29
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add stuff for unit testsKarel Zak3-1/+87
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: (gpt) fix compiler warnings [-Wformat]Karel Zak1-3/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add FDISK_LABEL_FL_ADDPART_NOPARTNOKarel Zak1-0/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: remove fdisk_label from API functions, add asserts, use size_tKarel Zak5-108/+150
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: (gpt) move code from fdisk to libfdiskKarel Zak3-1/+1825
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add part_get_status operationKarel Zak3-0/+30
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: cleanup fdisk_get_partition_type() returnsKarel Zak1-1/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add label->changed flagKarel Zak3-0/+19
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: (gpt) introduce driver independent partitions countersKarel Zak1-4/+5
label->nparts_{max,cur} to later replace global variable partitions Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (gpt) remove global variables, cleanup header verificationKarel Zak1-1/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: move label identifier to label structKarel Zak4-8/+27
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add fdisk_label to driver APIKarel Zak4-26/+26
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: improve label deinitializationKarel Zak3-13/+16
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: kill dos_compatible_flag global variableKarel Zak2-0/+11
... move the variable to label private struct. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add fdisk_new_context(), reuse contextKarel Zak6-31/+83
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: split label and label operationsKarel Zak5-90/+147
Changes: - fdisk_label is a private label driver struct - generic header of the fdisk_label points to fdisk_label_operations - the private fdisk_label stuff is always allocated for all drivers during fdisk_context initialization - context->labels[] contains pointers to all supported labels (drivers) - context->label is a pointer to the currently used label This change allows to: - store label specific global settings (e.g. dos compatible mode, display units, ...) independently on the current label - add label specific function to the API Signed-off-by: Karel Zak <kzak@redhat.com>