summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fdisk: rewrite dump first sector add dump disklabel commandKarel Zak2013-09-163-22/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expert command (m for help): D PMBR: offset = 0, size = 512 bytes. 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 000001c0 01 00 ee fe ff ff 01 00 00 00 ff 9f 0f 00 00 00 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa GPT Header: offset = 512, size = 512 bytes. 00000200 45 46 49 20 50 41 52 54 00 00 01 00 00 02 00 00 00000210 ae 36 81 28 00 00 00 00 01 00 00 00 00 00 00 00 00000220 ff 9f 0f 00 00 00 00 00 00 08 00 00 00 00 00 00 00000230 de 9f 0f 00 00 00 00 00 e0 9d d8 d5 d6 da 1a 44 00000240 98 57 e4 11 64 88 ce 3b 02 00 00 00 00 00 00 00 00000250 80 00 00 00 80 00 00 00 4b c7 c9 54 00 00 00 00 00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * GPT Entries: offset = 1024, size = 16384 bytes. 00000400 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 00000410 bc ae 48 5e 22 e5 ca 4c aa 98 14 6d c9 1d 72 f4 00000420 00 08 00 00 00 00 00 00 de 9f 0f 00 00 00 00 00 00000430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) support for disklabel dumpKarel Zak2013-09-161-0/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_locate_disklabel()Karel Zak2013-09-163-0/+18
| | | | | | The function returns offset and size of disklabel elements. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) use generic 'created partition' messageKarel Zak2013-09-163-3/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: use fdisk_colon() and fdisk_sinfo()Karel Zak2013-09-166-105/+120
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: extend fdisk_info() functionalityKarel Zak2013-09-164-24/+95
| | | | | | | | - 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>
* fdisk: use fdisk_{info,warn} on more placesKarel Zak2013-09-162-16/+15Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) more robust PMBR partition size checkKarel Zak2013-09-161-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>
* fdisk: add -L to colorize outputKarel Zak2013-09-167-15/+77
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: improve info outputKarel Zak2013-09-162-4/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use fdisk_info() to print geometryKarel Zak2013-09-161-21/+16Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: -l refactoringKarel Zak2013-09-161-25/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: mark -s option as deprecatedKarel Zak2013-09-163-2/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: main() refactoringKarel Zak2013-09-161-32/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_has_user_device_properties()Karel Zak2013-09-163-12/+21
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: cleanup header fileKarel Zak2013-09-162-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: provide more details about GPTKarel Zak2013-09-161-3/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: move sync() and reread PT code from fdisk to libfdiskKarel Zak2013-09-165-40/+57
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: cleanup write table codeKarel Zak2013-09-162-18/+9Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: move remaining actions to menu callbacksKarel Zak2013-09-162-98/+78Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: move expect actions to menu callbackKarel Zak2013-09-162-49/+45Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: consolidate code in fdisk.cKarel Zak2013-09-161-78/+36Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: cleanup SGI functions namesKarel Zak2013-09-163-18/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: cleanup sgi menu callbackswqKarel Zak2013-09-162-32/+53
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: move "create label" actions to menu callbackKarel Zak2013-09-162-13/+31
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: remove common.hKarel Zak2013-09-166-9/+5Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: explicitly add COPYING fileKarel Zak2013-09-162-15/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add bsd driverKarel Zak2013-09-167-112/+23Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) final code clean upKarel Zak2013-09-161-6/+5Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) remove xbsd_ prefixKarel Zak2013-09-161-37/+37
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) minor code clean upKarel Zak2013-09-162-38/+14Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) rewrite list disklabel functionKarel Zak2013-09-164-105/+147
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) coding style, remove unnecessary #ifdefKarel Zak2013-09-161-18/+14Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) fix add/link partitionKarel Zak2013-09-161-64/+22Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) remove dead codeKarel Zak2013-09-161-19/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) *OSF --> *BSDKarel Zak2013-09-164-15/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) implement regular bsd menu callbackKarel Zak2013-09-164-71/+60Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) remove generic actions from bsd_command_prompt()Karel Zak2013-09-162-31/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: allow to exchange context pointer in menu callbacksKarel Zak2013-09-163-20/+47
| | | | | | | ... to make it possible to switch to nested contexts (nested partition tables). Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) remove printf() from the driver codeKarel Zak2013-09-161-14/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) move bsdbuffer to fdisk_bsd_label structKarel Zak2013-09-161-19/+16Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) move global label variables to fdisk_bsd_label structKarel Zak2013-09-161-173/+143Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) write/read PT code cleanupKarel Zak2013-09-162-82/+72Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix kboff usage in BSD proberKarel Zak2013-09-161-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) add bsd_get_partition_status()Karel Zak2013-09-161-16/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: ask for partition in charsKarel Zak2013-09-161-13/+38
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: allow to address partition by charsKarel Zak2013-09-163-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>
* fdisk: improve menus to make it more usable for BSD labelKarel Zak2013-09-162-21/+26
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (bsd) cleanup driver initializationKarel Zak2013-09-162-87/+93
| | | | | | | | - assume DOS partition only for nested BSD (cxt->parent is set) - don't create BSD label in label probe function, require fdisk_create_disklabel() call Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: improve nested context initializationKarel Zak2013-09-162-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>