summaryrefslogtreecommitdiff
path: root/fdisks
AgeCommit message (Collapse)AuthorFilesLines
2014-02-17cfdisk: support for illumos disks (/dev/rdsk/c0t0d0p0)HEADmasterIgor Pashev1-0/+13
2013-11-19fdisk: fix usage(), -l [<disk>]Karel Zak1-2/+2
Add square brackets, <disk> is optional for -l. Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-23libfdisk: (gpt) allow to work with hybrid GPTKarel Zak1-1/+5
Notes: * fdisk don't sync hybrid MBR with GPT * hybrid MBR is ignored and not overwritten by PBMR * users is informed about expert command 'M' to toggle between MBR and GPT mode. It's possible to manually modify hybrid MBR. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-23fdisk: reorder intro warningsKarel Zak1-4/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-23fdisk: (gpt) add A,B,R,S expert commands to modify attributesKarel Zak1-1/+22
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-23fdisk: fix printf stuffKarel Zak3-15/+14
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-23fdisk: add 'M' to access GPT nested protective/hybrid MBRKarel Zak1-17/+71
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-21fdisk: fix man warningKarel Zak1-1/+1
error: run: man --warnings=all fdisks/fdisk.8 >/dev/null <standard input>:209: cannot use a space as a starting delimiter Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-15fdisk: fix printf stuffKarel Zak2-3/+5
Unfortunately, fdisk_warn/info/.. function was not marked by printf __attribute__. We don't want to break gettext stuff now, so all compiler warnings have been fixed by casts. This is temporary solution, after release it will be necessary to fix all the strings. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-15docs: standardize the phrases for --help and --version in all man pagesBenno Schulenberg1-4/+2
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-14docs: tweak wording, grammar and formatting of fdisk man pageBenno Schulenberg1-50/+53
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-09fdisk: add -t <type> to enable only specified typeKarel Zak2-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>
2013-10-08textual: use consistent wording and punctuation in fdisk stuffBenno Schulenberg1-3/+3
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08textual: change spelling of "disk label" to the more abundant "disklabel"Benno Schulenberg2-4/+4
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08textual: use the standard angular brackets for non-literal argumentsBenno Schulenberg1-1/+1
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-04build-sys: Check for type sighandler_t and use if presentMichael Forney1-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>
2013-09-30Merge branch 'master' of https://github.com/yurchor/util-linuxKarel Zak1-2/+2
2013-09-30clean up term lib handlingMike Frysinger1-4/+3
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>
2013-09-28Fix various typosYuri Chornoivan1-2/+2
2013-09-26fdisk: use xalloc stuffKarel Zak1-11/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-25fdisk: print geometry for dos-compatible mode tooKarel Zak1-1/+1
2013-09-17fdisk: fix 'r' in BSD menuKarel Zak1-5/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17fdisk: remove unnecessary testKarel Zak2-31/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17fdisk: bloody revolution in the man pageKarel Zak1-164/+169
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17fdisk: separate disks by \n in -l outputKarel Zak1-0/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17sfdisk: fix y/n mismatchKarel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-17fdisk: add debug message, use colors for -lKarel Zak1-2/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: fix -lKarel Zak1-1/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: remove unused code, coding style changesKarel Zak3-29/+10
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: rewrite dump first sector add dump disklabel commandKarel Zak3-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>
2013-09-16libfdisk: (gpt) use generic 'created partition' messageKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: use fdisk_colon() and fdisk_sinfo()Karel Zak1-12/+12
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: extend fdisk_info() functionalityKarel Zak1-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>
2013-09-16fdisk: use fdisk_{info,warn} on more placesKarel Zak2-16/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: add -L to colorize outputKarel Zak5-9/+51
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: improve info outputKarel Zak2-4/+18
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: use fdisk_info() to print geometryKarel Zak1-21/+16
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: -l refactoringKarel Zak1-25/+17
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: mark -s option as deprecatedKarel Zak2-2/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: main() refactoringKarel Zak1-32/+35
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add fdisk_has_user_device_properties()Karel Zak1-12/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: cleanup header fileKarel Zak2-0/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: move sync() and reread PT code from fdisk to libfdiskKarel Zak2-39/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: cleanup write table codeKarel Zak2-18/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: move remaining actions to menu callbacksKarel Zak2-98/+78
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: move expect actions to menu callbackKarel Zak2-49/+45
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: consolidate code in fdisk.cKarel Zak1-78/+36
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: cleanup SGI functions namesKarel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: cleanup sgi menu callbackswqKarel Zak2-32/+53
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: move "create label" actions to menu callbackKarel Zak2-13/+31
Signed-off-by: Karel Zak <kzak@redhat.com>