summaryrefslogtreecommitdiff
path: root/disk-utils
AgeCommit message (Collapse)AuthorFilesLines
2011-01-17mkfs.cramfs: use symbolic exit codesSami Kerola1-20/+20
For some reason original author had defined symbolic exit codes, but had not use them. One could argue the symbolic exit codes for mkfs should go to local exit header which would be included to all commands that exit with non zero or one return code. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-01-17mkfs: general cleanupsDavidlohr Bueso1-18/+7
Use xalloc, remove unused headers, use EXIT_* constants. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-01-17disk-utils: fix manpage typosDavidlohr Bueso2-2/+2
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-30rename util-linux-ng back to util-linuxKarel Zak10-19/+19
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23lib: [strutils] general purpose string handling functionsDavidlohr Bueso2-2/+2
This patch replaces a few functions used throughout the source: * Renames getnum (from schedutils) to strtol_or_err * Moves strtosize (from lib/strtosize.c) * Moves xstrncpy (from include/xstrncpy.h) * Adds strnlen, strnchr and strndup if not available (remove it from libmount utils) A few Makefile.am files were modified to compile accordingly along with trivial renaming in schedutils source code. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-10-29remove free() from atexit() callbacksKarel Zak1-6/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-28blockdev: fix typo in blockdev.8Karel Zak1-1/+1
Reported-by: Marcos Felipe Rasia de Mello <marcosfrm@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-24blockdev: sync man page with codeKarel Zak2-69/+61
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-24blockdev: add BLKDISCARDZEROESKarel Zak1-0/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-29mkfs: add `mkfs.ext4` to section SEE ALSO of `mkfs.8`.Paul Menzel1-0/+1
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
2010-06-30mkswap: tweak the man pageBenno Schulenberg1-35/+35
Note that option -v0 is obsolete, and remove the now unneeded comment about new-style swap areas. Further doublespace sentences, add some commas and articles, and alphabetize the options. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2010-06-17mkswap: add a note that -p is uncecessaryKarel Zak1-1/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-17mkswap: don't use too small user-specified page sizeKarel Zak1-1/+1
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=601552 Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-17mkswap: use calloc(), remove obsolete v1 header usageKarel Zak1-7/+13
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-14textual: fix typosKarel Zak1-1/+1
Reported-by: Petr Pisar <petr.pisar@atlas.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-14messages: gettextize a few skipped or forgotten onesBenno Schulenberg2-3/+3
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2010-05-24build-sys: replace ../ with $top_srcdirKarel Zak1-5/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-07swaplabel: fix typo in man pageKarel Zak1-1/+1
Reported-by: Marcos Felipe Rasia de Mello <marcosfrm@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-02swaplabel: new commandJason Borden4-12/+317
Print or change the label / UUID of a swap area. [kzak@redhat.com: - code refactoring - add long options - clean up Makefile.am] Signed-off-by: Jason Borden <jborden@bluehost.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-02mkswap: zap bootbits on regular filesKarel Zak1-3/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-01mkswap: move write_all() to include/writeall.hKarel Zak1-18/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-31blockdev: reduce usage text widthFrancesco Cosoleto1-4/+4
Use spaces in usage text instead of tabs and reduce the distance between option names and descriptions. This helps to minimize problems due to limited number of columns and translated texts which take up more space than English. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-03-30mkswap: fixed strtoll() usageYann Droneaud1-2/+3
- catch empty string - check against LLONG_MAX and LLONG_MIN instead of ULLONG_MAX and 0 Signed-off-by: Yann Droneaud <yann@droneaud.fr>
2010-03-30mkswap: more robust strtoull() usageKarel Zak1-6/+11
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11mkswap: don't call blkdev_find_size()Karel Zak1-2/+0
.. it's already called by blkdev_get_size(). Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-02fsck/mkfs/mount: unify default search paths for helpersMike Frysinger1-1/+1
Rather than each fs util having its own search policy, unify the paths in configure and allow them to be tweaked by downstream. In the process, drop the /etc paths as no one has ever really used these. [kzak@redhat.com: - backport to autoconf < 2.64 (remove AS_{SET,IF,CASE,APPEND} macros)] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-09build-sys: cleanup AM_CFLAGS usageKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-06build-sys: fix out-of-source buildKarel Zak1-1/+1
The blkid.h file is generated and stored in $top_builddir. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-02mkswap: restore device argument in mkswap.8 synopsisPeter Breitenlohner1-0/+1
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-10-27build-sys: add HAVE_LIBBLKID_INTERNALKarel Zak1-2/+2
It's better to use one macro for all situations where we depends on in-tree (internal) libblkid. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-17mkfs.minix: fix strict-aliasing bugsKarel Zak1-2/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-17fsck.minix: fix strict-aliasing bugsKarel Zak1-1/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16Revert "build-sys: move fsck/mkfs for bfs/cramfs/minix to /usr"Karel Zak1-7/+6
See http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2689/focus=2690 This reverts commit d4fa971c42467fb69e5d89d28e1b98c491a1505a.
2009-10-16blockdev: use c.hKarel Zak1-4/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-15fsck.minix: fix broken zone checkingKarel Zak2-6/+5
This bug has been introduced by commit 95356e8b744439336925eeb36f01399f1ee8a5e9. The fsck.minix code assumes that isset() macro returns boolean, unfortunately the generic implementation from libc returns integer. This patch also add a fallback for the bitmap macros to include/bitops.h. Reported-by: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-15blockdev: fix topology ioctlsKarel Zak1-1/+1
kernel 2.6.32-rc4 (kvm): # blockdev -v --getss --getpbsz --getiomin --getioopt --getmaxsect --getalignoff /dev/sda get logical block (sector) size: 512 get physical block (sector) size: 512 get minimum I/O size: 512 get optimal I/O size: 0 get max sectors per request: 1024 get alignment offset: 0 Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-15blockdev: add topology ioctls supportKarel Zak1-1/+31
new options: --getpbsz get physical block (sector) size --getiomin get minimum I/O size --getioopt get optimal I/O size --getalignoff get alignment offset --getmaxsect get max sectors per request Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-15blockdev: add support for uint and ushort ioctlsKarel Zak1-0/+18
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-14blockdev: refactoring (better commands definition)Karel Zak1-92/+162
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-12build-sys: move fsck/mkfs for bfs/cramfs/minix to /usrMike Frysinger1-6/+7
The bfs/cramfs/minix rarely (if ever?) are used for root filesystems, so it doesn't make much sense to keep them in the root partition. Move them to /usr by default. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-09Remove now unused <sys/ioctl.h> includesGuillem Jover4-4/+0
Those became unused with the switch to the blkdev functions. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2009-10-09build-sys: detect if volatile is availableGuillem Jover1-4/+0
Do not defined volatile away on non-Linux systems, detect its presence using AC_C_VOLATILE instead. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2009-10-06fdformat: fix memory leak in verify_disk()Cristian Rodríguez1-0/+2
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
2009-09-29mkfs.cramfs: fix gcc warning (incompatible pointer type)Karel Zak1-3/+2
mkfs.cramfs.c: In function ‘parse_directory’: mkfs.cramfs.c:310: warning: passing argument 4 of ‘scandir’ from incompatible pointer type Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-29mkswap: use libblkid to detect PTKarel Zak2-10/+43
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-07mkswap: fix memory leaks, cleanup check_blocks()Karel Zak1-5/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-07mkswap: unbreak -c ("check") option.Peter De Wachter1-2/+2
In the check_blocks() loop, current_page is not incremented. Because of this bug, the loop does not end when the end of the device is reached. Instead it tries to continue reading, which of course fails, and eventually mkswap aborts ("too many bad pages"). Note that this can only be tested with swap partitions, mkswap ignores the -c option for swap files. Signed-off-by: Peter De Wachter <pdewacht@gmail.com>
2009-08-17mkswap.8: formattingPeter Breitenlohner1-6/+15
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17mkfs.minix.8: formattingPeter Breitenlohner1-9/+10
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17mkfs.bfs.8: formattingPeter Breitenlohner1-12/+9
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>