summaryrefslogtreecommitdiff
path: root/libfdisk/src
AgeCommit message (Collapse)AuthorFilesLines
2013-09-18libfdisk: fix cylinders and sector buffer usageKarel Zak5-2/+25
- sector buffer has to be correctly deallocated - round to cylinders when use cylinder units in dos driver Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-18libfdisk: fix sectorbuffer usage in dos driverKarel Zak1-3/+35
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17libfdisk: update test_ranges() codeKarel Zak1-7/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17libfdisk: use fdisk_warnx() in fdisk_ask_partnum()Karel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17fdisk: add debug message, use colors for -lKarel Zak1-1/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: fix -lKarel Zak1-3/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: remove "gpt support is new" warningKarel Zak1-4/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: remove unused code, coding style changesKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: make default geom usage more robustKarel Zak1-10/+8
.. to avoid SIGFPE References: https://bugzilla.redhat.com/show_bug.cgi?id=1005566 Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (gpt) support for disklabel dumpKarel Zak1-0/+40
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add fdisk_locate_disklabel()Karel Zak3-0/+18
The function returns offset and size of disklabel elements. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (gpt) use generic 'created partition' messageKarel Zak2-2/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: use fdisk_colon() and fdisk_sinfo()Karel Zak5-93/+108
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: extend fdisk_info() functionalityKarel Zak3-6/+60
- add per message flags - add fdisk_colon() for "foo bar: bla bla..." messages - add fdisk_sinfo() as smart version of fdisk_info() Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (gpt) more robust PMBR partition size checkKarel Zak1-2/+3
According UEFI specification at least one (does not mean that the first) partition is 0xFF, it makes sense to check the size of the partition rather than check the first partition. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add fdisk_has_user_device_properties()Karel Zak2-0/+12
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: provide more details about GPTKarel Zak1-3/+10
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: move sync() and reread PT code from fdisk to libfdiskKarel Zak3-1/+51
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: cleanup SGI functions namesKarel Zak2-16/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: explicitly add COPYING fileKarel Zak1-15/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add bsd driverKarel Zak3-0/+945
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (bsd) *OSF --> *BSDKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: allow to address partition by charsKarel Zak3-14/+37
For example BSD uses letters rather tahn numbers to address partition, the fist partition is 'a', last partition is 'p'. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: improve menus to make it more usable for BSD labelKarel Zak1-6/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: improve nested context initializationKarel Zak2-9/+27
- all label prober() function in fdisk_new_nested_context() - don't reset device properties for nested contexts Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (dos) cosmetic changesKarel Zak1-12/+29
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: move mbr code to the libraryKarel Zak3-0/+1928
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: cleanup warning messagesKarel Zak1-1/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: remove nowarn global variableKarel Zak2-1/+27
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add generic function to set disklabel IDKarel Zak4-2/+68
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add generic function to get disklabel IDKarel Zak4-11/+46
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (gpt) enlarge columns in list outputKarel Zak1-3/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: cleanup warningsKarel Zak2-0/+25
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add FDISK_LABEL_FL_REQUIRE_GEOMETRYKarel Zak4-2/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: use libfdisk to ask for partition typeKarel Zak2-0/+17
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: copy ask callback from parental contextKarel Zak1-0/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: remove Mac codeKarel Zak5-8/+0
The code has been used only to detect magic strings, nothing else. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (sgi) add driverKarel Zak3-0/+1197
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (sun) remove duplicate codeKarel Zak1-5/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: make it possible to reset device propertiesKarel Zak5-50/+163
- remember user C/H/S and sector size - reset all device properties before create a new label (maybe the old setting has been affected by previous on-disk label) - always apply user setting after the reset - improve topology/geometry debug messages Note that for fdisk "user C/H/S and sector size" means on command line specified values. If you override the setting by c/h/s commands in expert menu then the setting is applied to the current disk label only. If you create a new disk label (e.g change MBR to GPT) then fdisk will use the original setting. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: move sun commands to sun menu callbackKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: clean up sun geometry stuffKarel Zak3-31/+41
- move fdisk_sun_set_* functions to public API file - remove extra function to set ncyl -- this has to follow regular geo.cylinders - set alternative cylinders to zero (to be compatible with parted) - it seems that the previous code completely ignored relation between geo.cylinders, sunlabel->acyl and sunlabel->ncyl. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: support GPT partition name (label) changeKarel Zak2-7/+48
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add FDISK_DEBUG_FRONTENDKarel Zak1-0/+1
Currently we use private libfdisk in fdisk code, because the library API is not stable yet. Let's add debug flag to make it obvious in the debug output what is from libfdisk and what is from fdisk frontend. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: make the library usable with testsKarel Zak1-1/+2
We don't have completely initialized all label drivers in the tests, so make the code more robust. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: remove unnecessary code from test_fdisk_askKarel Zak1-1/+0
.. 'sun' stuff is already in the library. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (gpt) print UUID and NAME in expert mode onlyKarel Zak1-16/+39
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (gpt) cleanup structs members namesKarel Zak1-13/+19
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add asktype "string" and support UUID partition changeKarel Zak4-1/+105
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (sun) move driver from fdisk to libraryKarel Zak5-3/+1043
... and also add fdisk_info_new_partition() Signed-off-by: Karel Zak <kzak@redhat.com>