summaryrefslogtreecommitdiffstats
path: root/fdisk
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2011-08-314-893/+1Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit: docs: remove duplicated text docs: require kernel support before accepting use of it docs: note about independent super block structs docs: add libmount & libblkid debug instructions Documentation: add debugging doc arch: start using arch as a usage() example docs: new file Documentation/release-schedule.txt docs: move setuid information from reame to hwclock.8 docs: clean up old readme files docs: copy contributors from legacy files to AUTHORS docs: new file Documentation/howto-man-page.txt docs: new file Documentation/source-code-management.txt docs: new file Documentation/howto-contribute.txt docs: new file Documentation/howto-compilation.txt docs: tell what the Documentation/ is about docs: add usage() howto for contributors docs: Documentation directory added docs: remove README.clear
| * docs: Documentation directory addedSami Kerola2011-08-124-893/+1Star
| | | | | | | | | | | | | | | | Move readme, licence, change log, relese notes and other supplementary files to a Documentation directory. This commit does not change contents of any other but few Makefile.am files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | sfdisk.8: fix formattingPetr Uzel2011-08-301-1/+1
| | | | | | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* | fdisk: print welcome messageFrancesco Cosoleto2011-08-303-11/+7Star
| | | | | | | | | | | | | | | | | | | | This adds a welcome message with util-linux version number, information about fdisk behaviour that doesn't write to disk after a command (unlike gparted) and a warning about possible data loss. The message appears just before the first command prompt. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* | fdisk: print partition deleted messageFrancesco Cosoleto2011-08-301-13/+5Star
| | | | | | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* | fdisk: print a message with size and type of created partitionFrancesco Cosoleto2011-08-305-2/+27
| | | | | | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* | sfdisk: make some tests conditional to !LinuxGiulio Orsero2011-08-231-8/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the following tests/actions conditional to "!Linux": - Force cylinders as format instead of MB, even if user asked for MB. This solves a bug where if you use "-L -uM", set 1 as starting MB and the disk is larger than a certain size (about 1GB) the partition would start at sector 1 instead of 1MB due to cyl rounding. - Warn about partitions not starting/ending on cyl boundaries. - Check if CHS is ok. I used the "!Linux" notation since it was already used elsewhere in the code. Signed-off-by: Giulio Orsero <giulioo@pobox.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: uniformize the header and footer lines in man pagesBenno Schulenberg2011-08-222-5/+5
| | | | | | | | | | | | | | | | | | | | Use dates without the day, use the full month name, put "util-linux" in the lower left corner, and "User Commands" or "System Administration" at the top center. Also improve here and there the one-line program description. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | sfdisk: fix typo in man pageKarel Zak2011-08-161-1/+1
| | | | | | | | | | | | | | Reported-by: markus reichelt <ml@mareichelt.com> Signed-off-by: Karel Zak <kzak@redhat.com> sk/sfdisk.8
* | sfdisk: slice help text into small chunks and improve its wordingBenno Schulenberg2011-08-161-55/+56
| | | | | | | | | | | | | | [kzak@redhat.com: - use fputs(), - use <var> convention] Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | sfdisk: (man page) use comma between short and long option instead of "or"Benno Schulenberg2011-08-161-89/+90
| | | | | | | | | | | | | | | | Also fix some erratic formatting, indent the third example too, drop the trailing % prompt in examples, add a blank line before and after, and improve the wording here and there. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | sfdisk: indent usage()Karel Zak2011-08-161-42/+41Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | sfdisk: correct '--inside-order' to '--inside-outer' in documentationBenno Schulenberg2011-08-152-4/+4
| | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | sfdisk: remove inconsistent and wasteful newlines in the _() callsBenno Schulenberg2011-08-151-70/+43Star
| | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | sfdisk: improve descriptions of options --no-reread and --show-extendedBenno Schulenberg2011-08-151-4/+4
| | | | | | | | | | | | Also keep the two geometry options (-g and -G) together by moving -A. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | sfdisk: gettextize each warning as a wholeBenno Schulenberg2011-08-151-4/+4
| | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | fdisksgilabel: correct the grammar of an error messageBenno Schulenberg2011-08-151-1/+1
|/ | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cfdisk: fix compiler warnings [-Wunused-parameter]Karel Zak2011-08-011-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix compiler warnings [-Wunused-parameter -Wsign-compare]Karel Zak2011-08-014-15/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: fix compilation with slangKarel Zak2011-07-281-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use a single variable for the current disklabelFrancesco Cosoleto2011-07-116-92/+85Star
| | | | | | | | | | | | Using a variable for each supported partition table type doesn't seem necessary. This fixes also a minor bug in switching from SGI label to SUN label: the expert menu isn't available as sgi_label variable remains set to true. Code a bit more clear as *_label names have similarity with names such as "sgilabel", "struct sun_label". Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* sfdisk: fix coding style.Karel Zak2011-06-291-918/+998
| | | | | | | | | | | | The style in the file is really horrible and unreadable. This patch uses: indent -linux -i4 -psl -brf sfdisk.c to fix the style. The ideal solution is to call the indent with only -linux option, but it's too invasive... Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master', remote-tracking branch 'upstream/master' into sfdiskSami Kerola2011-06-162-18/+18
|\
| * fdisk, display, hexdump.h: Use standard C types instead of u_int, u_char, ↵Josiah Worcester2011-06-141-17/+17
| | | | | | | | | | | | u_long, etc. Signed-off-by: Josiah Worcester <josiahw@gmail.com>
| * cfdisk: fix gcc warning (unused variable)Karel Zak2011-06-081-1/+1
| | | | | | | | | | | | | | cfdisk.c: In function ‘fp_printf’: cfdisk.c:1760:12: warning: variable ‘x’ set but not used [-Wunused-but-set-variable] Signed-off-by: Karel Zak <kzak@redhat.com>
* | sfdisk: fix for data type mismatchesSami Kerola2011-06-141-6/+7
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | sfdisk: fix implicit overflowSami Kerola2011-05-301-1/+1
| | | | | | | | | | | | sfdisk.c:1650:6: warning: overflow in implicit constant conversion [-Woverflow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | docs: sfdisk manual updateSami Kerola2011-05-301-11/+42
| | | | | | | | | | | | | | Add to manual page previously unmentioned options and few missing long options. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | sfdisk: previously undocumented options to usageSami Kerola2011-05-301-21/+50
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | sfdisk: help screen formatSami Kerola2011-05-301-45/+48
| | | | | | | | | | | | | | Readability improvement by making the help screen to look like majority of command line utilities. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | sfdisk: declare unused function attributesSami Kerola2011-05-301-4/+16
|/ | | | | | Add `__attribute__ ((__unused__))' where needed. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdisk: accept digits-space-suffix formatFrancesco Cosoleto2011-05-101-0/+3
| | | | | | This is for users who are used to separate with a space numbers from units. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdisk: print logical partition number while adding itFrancesco Cosoleto2011-05-101-2/+4
| | | | | | | [kzak@redhat.com: - merged two Francesco's patches] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdisk: quit from partition type dialog after invalid responseFrancesco Cosoleto2011-05-101-25/+20Star
| | | | | | This gets rid of the while() loop and fixes indentation. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdisk: add a default response for the partition type dialogFrancesco Cosoleto2011-05-101-5/+13
| | | | | | | | | The default response is 'p' until three primary partitions are created, then 'e'. The original idea is from Karel Zak. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdisk: change primary or extended partition type dialogFrancesco Cosoleto2011-05-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mainly this appends a colon for the prompt, reverses order of the list, reports the number of primary partitions used and unused. Old version: Command action e extended p primary partition (1-4) p New version: Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select: p Old version: Command action l logical (5 or over) p primary partition (1-4) l New version: Partition type: p primary (0 primary, 1 extended, 3 free) l logical (numbered from 5) Select: l Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* sfdisk: returns non-zero on failed BLKRRPART ioctlAndrea Galbusera2011-05-061-8/+17
| | | | | | | | | | | Make sfdisk(8) return non-zero value on failed BLKRRPART ioctl(). This will happen for either partition table re-reads after partition changes or on explicit use of -R switch. The function reread_disk_partition() was changed from 'void' to 'int' and now returns a result to let the calling functions decide to exit(1). Signed-off-by: Andrea Galbusera <gizero@gmail.com>
* fdisk: improve error message for missing extended partitionFrancesco Cosoleto2011-05-031-2/+2
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdisk: fix "invalid partition number for type" error messageFrancesco Cosoleto2011-05-031-2/+1Star
| | | | | | You can't input a partition number here. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdisk: check index before access to array [coverity scan]Karel Zak2011-03-171-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: don't use HAVE_LIBBLKID_INTERNAL macroKarel Zak2011-03-162-5/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: don't support external (e2fsprogs) libblkidKarel Zak2011-03-161-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: add home and end keys movements in partition listFrancesco Cosoleto2011-03-111-0/+6
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* cfdisk: move keys related to the cursor of the partition list outside ↵Francesco Cosoleto2011-03-111-15/+7Star
| | | | | | menuselect() Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* cfdisk: move "No more partition" warning to draw_cursor()Francesco Cosoleto2011-03-111-14/+8Star
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* cfdisk: use keypad() in menu selection functionFrancesco Cosoleto2011-03-111-71/+41Star
| | | | | | | This makes the source code looks cleaner, and works a bit better than the previous way with hardcoded escape sequences. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* cfdisk: fix compiler warningKarel Zak2011-02-211-1/+1
| | | | | | | cfdisk.c: In function ‘menuUpdate’: cfdisk.c:1034:25: warning: unused variable ‘ymargin’ Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: remove unused vertical menu direction codeFrancesco Cosoleto2011-02-211-51/+5Star
| | | | | | | It isn't used and doesn't seem very important, as well as requires more work to run properly. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* sfdisk: rename warn to my_warnFabian Groffen2011-02-141-51/+51
| | | | | | | To avoid a conflict with the warn function from err.h, renamed warn to my_warn, as the functionality of both is not the same. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* cfdisk: data type mismatch, and other, compiler warning fixesSami Kerola2011-01-251-5/+10
| | | | | | | | | | | | | | | | | | Following warnings will longer appear when one will compile with gcc flags -Wall -Wextra -pedantic cfdisk.c:475:3: warning: comparison of unsigned expression < 0 is always false cfdisk.c:487:16: warning: comparison between signed and unsigned integer expressions cfdisk.c:492:14: warning: comparison between signed and unsigned integer expressions cfdisk.c:565:19: warning: comparison between signed and unsigned integer expressions cfdisk.c:569:19: warning: comparison between signed and unsigned integer expressions cfdisk.c:1070:14: warning: comparison between signed and unsigned integer expressions cfdisk.c:1568:5: warning: missing initializer cfdisk.c:1568:5: warning: (near initialization for 'tmp_ext.volume_label') mbsalign.c:131:2: warning: comparison of unsigned expression >= 0 is always true Signed-off-by: Sami Kerola <kerolasa@iki.fi>