summaryrefslogtreecommitdiffstats
path: root/disk-utils
Commit message (Collapse)AuthorAgeFilesLines
...
* cfdisk: remove the mistaken B from the explanation of size suffixesBenno Schulenberg2015-02-021-2/+2
| | | | | | | Also reword the explanation to be clearer. It is not necessary to be complete -- that is what the man page is for. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* sfdisk: fix --id fallthrough [coverity scan]Karel Zak2015-01-281-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: deallocate when no cache [coverity scan]Karel Zak2015-01-281-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: check return and robust label usage [coverity scan]Karel Zak2015-01-282-3/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: check return when read from sysfs [coverity scan]Karel Zak2015-01-281-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: fix mem leak and main_menu_action() logic [coverity scan]Karel Zak2015-01-281-6/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: support unknown partition types in sfdisk scriptsKarel Zak2015-01-281-2/+2
| | | | | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1183234 Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: don't use off_t in public APIKarel Zak2015-01-262-6/+6
| | | | | | | | | | | | It's better to use exact and explicitly defined types (e.g. uint64_t) rather than something like off_t to make code more portable. [reported with gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3)] The patch also fixes one debug message. Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: actually translate the table headers and the bottom lineBenno Schulenberg2015-01-261-2/+2
| | | | | | | The printout of the table headers and the bottomline descriptions were lacking calls to gettext(). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cfdisk: shorten the help screen to make it fit within 25 linesBenno Schulenberg2015-01-261-14/+7Star
| | | | | | | | | | When the terminal has less than 32 lines, the new cfdisk ignored the fact that the help-screen text was longer and just skipped printing the remaining lines. Instead of introducing a minipager for the help screen, just condense its text and remove unneeded lines. Now the text occupies just 25 lines, which should fit on most terminals. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cfdisk: don't mess up the help screen by printing the PO file headerBenno Schulenberg2015-01-261-6/+5Star
| | | | | | | | | Asking for the translation of the empty string ("") produces the header of the PO file corresponding to the current locale, which messes up the help screen. So, don't use empty strings in the array of help strings but (arbitrary) double spaces. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: fix various minor typosYuri Chornoivan2015-01-261-10/+10
|
* Merge branch 'opts' of https://github.com/jwpi/util-linuxKarel Zak2015-01-263-18/+18
|\
| * docs: restore minus symbols in long optsJ William Piggott2015-01-213-18/+18
| | | | | | | | Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | textual: fix spellos and inconsistencies in several program messagesBenno Schulenberg2015-01-264-22/+22
|/ | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* libfdisk: accept Start offset in {B,M,G..}iB in sfdisk scriptsKarel Zak2015-01-202-4/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: fix --bytesKarel Zak2015-01-191-4/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdiskL add API to print SIZE field in bytesKarel Zak2015-01-192-3/+16
| | | | | | The patch also add --bytes to fdisk and fdisk. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add --output to usage()Karel Zak2015-01-141-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix-up man-pages flaged by checkmans.shJ William Piggott2015-01-131-1/+1
| | | | | | | | | disk-utils/sfdisk.8 Fix font escape login-utils/vipw.8 Delete bogus macro misc-utils/look.1 Delete bogus macro sys-utils/prlimit.1 Delete bogus macro Signed-off-by: J William Piggott <elseifthen@gmx.com>
* build-sys: add sfdisk.staticKarel Zak2015-01-131-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* raw: fix raw queryKarel Zak2015-01-131-1/+1
| | | | | | | Bug introduced by commit cd121363. References: https://bugzilla.redhat.com/show_bug.cgi?id=1181444 Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: don't use "hard drive" in man pagesKarel Zak2015-01-123-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: make the wording of the partx man page a bit more preciseBenno Schulenberg2015-01-121-16/+19
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* partx: simplify a --verbose progress messageBenno Schulenberg2015-01-121-1/+1
| | | | | Reported-by: Antonio Ceballos <aceballos@gmail.com> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: remove obsolete and unneeded comments from man-page filesBenno Schulenberg2015-01-128-10/+3Star
| | | | | | | Transform some of them into copyright lines. Also fix three header lines and snip some trailing whitespace. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: sync the docstring of addpart, delpart and resizepart to the man pageBenno Schulenberg2015-01-123-29/+25Star
| | | | | | Also tweak the wording of those man pages a bit. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* partx: add --update to ul_excl_twq listKarel Zak2015-01-122-4/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) cleanup header size usageKarel Zak2015-01-091-1/+1
| | | | | | | | | | | | | | | | | | Kay reported that Windows 8.1 installed does not recognize GPT created by libfdisk, but parted works as expected. It seems (according to the header hexdump) that the problem is HeaderSize GPT field where libfdisk uses 512 (header + reserved area), but parted uses 92. The both is pretty valid according to the current EFI standard, but 92 is probably more backwardly compatible. I also found places in code where libfdisk gpt driver is inconsistent and uses sometimes all sector and simetimes sizeof(gpt_header) only. The right solution is to read all sector (into zeroized memory) and later write again all sector to the device. Reported-by: Kay Sievers <kay@vrfy.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.minix: fix segmentation faultSami Kerola2015-01-071-3/+10
| | | | | | | | | Return from check_file() and check_file2() functions when maximum name depth is reached. The use unsafe strncpy() is also removed just to be on safe side. Addresses: https://bugs.debian.org/773892 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* maint: fix shadow declarationSami Kerola2015-01-072-26/+27
| | | | | | | | | | | | | | | | This change fixes all shadow declarations. The worth while to mention fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16 macro that further expands from include/bits/byteswap.h that has the shadowing. libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow] libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow] That could have caused earlier some unexpected results. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-0617-1/+61
| | | | | | | | | This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cfdisk: improve Dump dialogKarel Zak2015-01-051-9/+6Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: improve menu clean functionKarel Zak2015-01-051-7/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: detect too small partition sizesKarel Zak2015-01-051-6/+15
| | | | | References: https://github.com/karelzak/util-linux/issues/136 Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: in the usage text show -v for --version instead of -VBenno Schulenberg2014-12-191-1/+1
| | | | | | | In sfdisk -V is taken by --verify. Use for the description of --version the same indentation as for --help, not that of the other options. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: fix the grammar and formatting in the man page of sfdiskBenno Schulenberg2014-12-191-150/+161
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: adjust some formatting and wordings in a handful of man pagesBenno Schulenberg2014-12-191-60/+69
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: don't use bold or italics for "[option]" in synopsis of man pagesBenno Schulenberg2014-12-199-18/+25
| | | | | | | As per the convention shown in Documentation/howto-man-page.txt. Also make a few other tiny adjustments along the way. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: improve error messagesSami Kerola2014-12-093-4/+3Star
| | | | | | | Use error printing facilities that add command name in front of the error message, and add explanation that is part of existing translations. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libfdisk: rename sector_t to fdisk_sector_tKarel Zak2014-12-041-5/+7
| | | | | | .. just to avoid too generic names for public API. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: rename and move functionKarel Zak2014-11-263-12/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: remove flags from fdisk_ask APIKarel Zak2014-11-212-5/+3Star
| | | | | | We don't use it for anything usable, lets kill this over-engineering. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (dos) allow to maximize partitionKarel Zak2014-11-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | The struct fdisk_partition has special flag "end_follow_default" to make the partition large as much as possible. This patch makes this flag usable for fdisk_set_partition() function. Command line example (enlarge the first partition): # echo ',+' | ./sfdisk -N1 /dev/sdb ... Disk /dev/sdb: 100 MiB, 104857600 bytes, 204800 sectors ... Old situation: Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 22527 20480 10M 83 Linux ^^^^^ New situation: Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 204799 202752 99M 83 Linux ^^^^^^ Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: remove memory leaks [LeakSanitizer] [valgrind]Sami Kerola2014-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | | ==18922==ERROR: LeakSanitizer: detected memory leaks Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x49d12b in __interceptor_malloc (/home/src/util-linux/.libs/lt-mkswap+0x49d12b) #1 0x7faf2a5069c9 in __GI___strdup (/usr/lib/libc.so.6+0x819c9) #2 0xffff96e7e33 (<unknown module>) SUMMARY: AddressSanitizer: 8 byte(s) leaked in 1 allocation(s). And another one that valgrind found. ==6316== 8 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==6316== at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6316== by 0x5E3F9C9: strdup (in /usr/lib/libc-2.20.so) ==6316== by 0x43A25F: size_to_human_string (strutils.c:495) ==6316== by 0x42B35C: main (mkswap.c:488) Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdisk: missing break in switchBoris Egorov2014-11-131-0/+1
| | | | | Signed-off-by: Boris Egorov <egorov@linux.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: cleanup menuitem draw functionsKarel Zak2014-11-131-19/+55
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: remove [Load] from menuKarel Zak2014-11-133-22/+9Star
| | | | | | | | | This functionality will be rarely used, so it does not make sense to waste screen space with this menu item. It's enough to provide this functionality in "Select label type" dialog (cfdisk --zero and then 'L' command). Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: add support for sfdisk scriptsKarel Zak2014-11-123-4/+125
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add support for sfdisk scriptsKarel Zak2014-11-122-0/+91
| | | | | | | | | New commands 'I' and 'O' allows to read and write sfdisk compatible scripts by fdisk. It means that you can save your work (partition table) and later use it (in fdisk, sfdisk or cfdisk) to create a new partition table. Signed-off-by: Karel Zak <kzak@redhat.com>