summaryrefslogtreecommitdiffstats
path: root/disk-utils
Commit message (Collapse)AuthorAgeFilesLines
* fsck.cramfs: compile with -DINCLUDE_FS_TESTS for make checkKarel Zak2012-10-221-0/+5
| | | | | | | | | make check sudo su - cd tests ./run.sh cramfs Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: check numeric user inputsSami Kerola2012-10-151-11/+6Star
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* fix bold style of man page referencesMike Frysinger2012-10-091-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* mkswap: wipe old signature if there is no part table by defaultMilan Broz2012-09-212-30/+22Star
| | | | | | | | | | | | | | | | | | | | Historically mkswap avoids wiping any signature on "whole disk", until force option is given. While the idea is that it should not wipe possible boot loader, in reality it leads to many situations where e.g. LUKS device is overwritten but still can be detected as LUKS (but unusable). Patch chnges behaviour that only if partition table is detected, signatures are not wiped. Also it removes check for block device - loop device can now map partitions in-kernel, so using mkswap on disk image in file should behave the same as on disk. Also it adds warning that know signature was wiped. Signed-off-by: Milan Broz <mbroz@redhat.com>
* libmount: document LIBMOUNT_DEBUG usersDavidlohr Bueso2012-09-041-0/+3
| | | | | | | Update the manpages of programs that use this environment variable for extra debugging information. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* blkid: document LIBBLKID_DEBUG usersDavidlohr Bueso2012-09-044-0/+12
| | | | | | | Update the manpages of programs that use this environment variable for extra debugging information. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* fsck.cramfs: fix compiler warning [-Wpointer-arith]Karel Zak2012-09-041-2/+2
| | | | | | | | disk-utils/fsck.cramfs.c: In function ‘test_crc’: disk-utils/fsck.cramfs.c:231:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] disk-utils/fsck.cramfs.c:233:24: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: use less aggressive method to detect mounted devicesKarel Zak2012-08-241-7/+24
| | | | | | | | | | | | | | | | We should not care about mountpoints in fsck if a device name specified on command line, just check if the device is used somewhere in /proc/self/mountinfo file. Crazy people who use fsck /mountpoint have to specify the mountpoint by the same format as in their fstab -- symlinks canonicalization is not supported. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=850965 Signed-off-by: Karel Zak <kzak@redhat.com>
* resizepart: remove debug messageKarel Zak2012-08-141-3/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* resizepart: add new commandKarel Zak2012-08-134-2/+185
| | | | | | | This is a simple wrapper for BLKPG_RESIZE_PARTITION (since kernel 3.6). Co-Author: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: support -o +<attr> for adding attribute to output fieldsMilan Broz2012-07-261-5/+7
| | | | | Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: fix shadow declarationSami Kerola2012-07-261-2/+2
| | | | | | | disk-utils/mkswap.c:366:57: warning: declaration of 'is_blkdev' shadows a global declaration [-Wshadow] ./include/blkdev.h:92:5: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* partx: use err_exclusive_options()Karel Zak2012-07-261-7/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.cramfs: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.cramfs: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* raw: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* translation: unify file open error messagesSami Kerola2012-07-1611-13/+13
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* translation: unify stat error messagesSami Kerola2012-07-166-7/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fix buffer overrun in some calls to sscanfKarel Zak2012-07-091-1/+1
| | | | | Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: always use default $(LDADD)Karel Zak2012-07-091-14/+14
| | | | | | | | The global variable $(LDADD) is always used if program_LDADD is not specified. Let's use $LDADD everywhere to avoid exceptions for people who need to specify global $LDADD. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix swaplabelKarel Zak2012-06-261-1/+1
| | | | | Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup .gitignore filesKarel Zak2012-06-261-14/+0Star
| | | | | | | - move all binaries to top-level .gitignore - remove unnecessary */.gitignore files Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert lib/ to libcommon.laKarel Zak2012-06-261-52/+26Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move partx to disk-utils/Karel Zak2012-06-268-0/+1330
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert disk-utils/ to moduleKarel Zak2012-06-262-114/+128
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swaplabel: check blkid_probe_lookup_value() result [coverity scan]Karel Zak2012-06-211-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.cramfs: disallow unknown command line optionsSami Kerola2012-06-171-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck.cramfs: disallow unknown command line optionsSami Kerola2012-06-171-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: fix all man page groff warningsSami Kerola2012-06-021-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.cramfs: remove unused 'MIN' macro definitionPetr Uzel2012-05-231-4/+0Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* disk-utils: cleanup strtoxx_or_err()Karel Zak2012-05-153-30/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: rename writeall.h to all-io.hPetr Uzel2012-05-154-4/+4
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* mkswap: improve diagnostics message if the device is mountedPetr Uzel2012-05-151-4/+5
| | | | | | | | Currently, attempt to create swap on mounted partition results with "/dev/sdXy: Device or resource busy" message being printed. Change this to explicitly telling the user that the device is mounted. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* mkswap: allow creating swap on /dev/hd[ab]Petr Uzel2012-05-151-5/+0Star
| | | | | | | | | | Currently, mkswap does not allow swap to be created on /dev/hda and /dev/hdb. There is no reason why /dev/hda and /dev/hdb should be treated differently. Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491021 Cc: Russell Coker <russell@coker.com.au> Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* mkswap: use is_mounted() instead of check_mount()Petr Uzel2012-05-152-24/+3Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* fsck.minix.c: fix compiler warnings [-Wunused-result]Petr Uzel2012-04-271-1/+1
| | | | | | | fsck.minix.c: In function ‘ask’: fsck.minix.c:263:7: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result] Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* Fix typos found by misspellingsBernhard Voelker2012-04-231-1/+1
| | | | | | | | | | | | | | | The tool misspellings (https://github.com/lyda/misspell-check) detected several typos. Command used: $ git ls-files | grep -v ^po/ | misspellings -f - * isosize: Fix typo in usage string. * configure.ac: Fix typo in help string of --enable-most-builds option. * fdisk: Fix typo in man page. * libblkid, blkid, mount: Likewise. * Fix various typos in docs and in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* Merge branch 'close_stream' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2012-04-1114-0/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'close_stream' of git://github.com/kerolasa/lelux-utiliteetit: disk-utils: verify writing to streams was successful fdisk: verify writing to streams was successful getopt: verify writing to streams was successful hwclock: verify writing to streams was successful login-utils: verify writing to streams was successful misc-utils: verify writing to streams was successful mount: verify writing to streams was successful partx: verify writing to streams was successful schedutils: verify writing to streams was successful sys-utils: verify writing to streams was successful term-utils: verify writing to streams was successful text-utils: verify writing to streams was successful include: add stream error checking facility Conflicts: fdisk/fdisk.c
| * disk-utils: verify writing to streams was successfulSami Kerola2012-04-0414-0/+28
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | fsck: don't free fstab table on parse failureDave Reisner2012-04-101-1/+0Star
|/ | | | | | | | | Even if we fail parsing, fstab gets referenced later in the code (and will subsequently crash via heap corruption). Take the easy way out and simply avoid deallocating this table, as it will be freed for us on program exit regardless. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* swaplabel: add --version and align with howto-usage-function.txtSami Kerola2012-03-301-11/+15
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck.minix: fix printf format warningSami Kerola2012-03-301-1/+1
| | | | | | fsck.minix.c:1302:3: warning: ISO C does not support the '%m' gnu_printf format [-Wformat] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck.minix: clean up coding styleSami Kerola2012-03-301-360/+342Star
| | | | | | $ indent -linux -psl -blf disk-utils/fsck.minix.c Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck.minix: align with howto-usage-function.txtSami Kerola2012-03-301-10/+16
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck.minix: use rpmatch() for yes/no questionSami Kerola2012-03-301-21/+23
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck.minix: use symbolic exit codesSami Kerola2012-03-301-4/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck.cramfs: add long optionsSami Kerola2012-03-301-12/+20
| | | | | | And align with howto-usage-function.txt Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* raw: clean up coding styleSami Kerola2012-03-301-44/+29Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* raw: check numeric user inputsSami Kerola2012-03-301-2/+29
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* raw: use pathnames.h for file locationsSami Kerola2012-03-301-14/+14
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>