summaryrefslogtreecommitdiffstats
path: root/fdisks
Commit message (Collapse)AuthorAgeFilesLines
* docs: tweak wording, grammar and formatting of fdisk man pageBenno Schulenberg2013-10-141-50/+53
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* fdisk: add -t <type> to enable only specified typeKarel Zak2013-10-092-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases (for example hybrid GPT) it's useful to force fdisk to read only specified disk label and ignore everything else. For example: # fdisk -l /dev/sda Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 3549290F-417C-4941-8503-F7835109B821 Device Start End Size Type /dev/sda1 2048 2050047 1000M EFI System /dev/sda2 2050048 6146047 2G Microsoft basic data /dev/sda3 6146048 26462207 9.7G Linux swap /dev/sda4 26462208 98142207 34.2G Microsoft basic data /dev/sda5 98142208 230662143 63.2G Microsoft basic data /dev/sda6 230662144 312580095 39.1G Microsoft basic data but when GPT is disabled we can access PMBR: # fdisk -l -t dos /dev/sda Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 312581807 156290903+ ee GPT Reported-by: Craig <util-linux_contact@magister.com.au> Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: use consistent wording and punctuation in fdisk stuffBenno Schulenberg2013-10-081-3/+3
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: change spelling of "disk label" to the more abundant "disklabel"Benno Schulenberg2013-10-082-4/+4
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: use the standard angular brackets for non-literal argumentsBenno Schulenberg2013-10-081-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: Check for type sighandler_t and use if presentMichael Forney2013-10-041-1/+5
| | | | | | | __sighandler_t is libc implementation specific and should not be relied upon. Instead, we fall back upon void (*)(int), as specified by POSIX. Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/yurchor/util-linuxKarel Zak2013-09-301-2/+2
|\
| * Fix various typosYuri Chornoivan2013-09-281-2/+2
| |
* | clean up term lib handlingMike Frysinger2013-09-301-4/+3Star
|/ | | | | | | | | | | | | | | | | The ncurses package has been providing pkg-config files for a while now. So let's start using them to get the proper linker & compiler flags. It can make a difference when ncurses is configured in a way that requires extra link time flags but util-linux doesn't provide them, or when the headers live in a weird place and util-linux can't find them. Since the NCURSES_LIBS is always defined for the Makefile, there's no need to gate on the HAVE_NCURSES conditional. When it's disabled, the var will simply be empty. With a minor tweak to how tinfo is handled, we can do the same thing -- we just always use TINFO_LIBS in the Makefile's. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fdisk: use xalloc stuffKarel Zak2013-09-261-11/+9Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: print geometry for dos-compatible mode tooKarel Zak2013-09-251-1/+1
|
* fdisk: fix 'r' in BSD menuKarel Zak2013-09-171-5/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: remove unnecessary testKarel Zak2013-09-172-31/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: bloody revolution in the man pageKarel Zak2013-09-171-164/+169
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: separate disks by \n in -l outputKarel Zak2013-09-171-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: fix y/n mismatchKarel Zak2013-09-171-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add debug message, use colors for -lKarel Zak2013-09-171-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix -lKarel Zak2013-09-161-1/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: remove unused code, coding style changesKarel Zak2013-09-163-29/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* 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) use generic 'created partition' messageKarel Zak2013-09-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: use fdisk_colon() and fdisk_sinfo()Karel Zak2013-09-161-12/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: extend fdisk_info() functionalityKarel Zak2013-09-161-18/+35
| | | | | | | | - 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>
* fdisk: add -L to colorize outputKarel Zak2013-09-165-9/+51
| | | | 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-162-2/+5
| | | | 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-161-12/+9Star
| | | | 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: move sync() and reread PT code from fdisk to libfdiskKarel Zak2013-09-162-39/+6Star
| | | | 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-161-2/+2
| | | | 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: add bsd driverKarel Zak2013-09-165-1034/+0Star
| | | | 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-163-14/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>