summaryrefslogtreecommitdiffstats
path: root/disk-utils
Commit message (Collapse)AuthorAgeFilesLines
* rename util-linux-ng back to util-linuxKarel Zak2010-11-3010-19/+19
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: [strutils] general purpose string handling functionsDavidlohr Bueso2010-11-232-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>
* remove free() from atexit() callbacksKarel Zak2010-10-291-6/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: fix typo in blockdev.8Karel Zak2010-08-281-1/+1
| | | | | Reported-by: Marcos Felipe Rasia de Mello <marcosfrm@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: sync man page with codeKarel Zak2010-08-242-69/+61Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: add BLKDISCARDZEROESKarel Zak2010-08-241-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs: add `mkfs.ext4` to section SEE ALSO of `mkfs.8`.Paul Menzel2010-07-291-0/+1
| | | | Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
* mkswap: tweak the man pageBenno Schulenberg2010-06-301-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>
* mkswap: add a note that -p is uncecessaryKarel Zak2010-06-171-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: don't use too small user-specified page sizeKarel Zak2010-06-171-1/+1
| | | | | Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=601552 Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: use calloc(), remove obsolete v1 header usageKarel Zak2010-06-171-7/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: fix typosKarel Zak2010-06-141-1/+1
| | | | | Reported-by: Petr Pisar <petr.pisar@atlas.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* messages: gettextize a few skipped or forgotten onesBenno Schulenberg2010-06-142-3/+3
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: replace ../ with $top_srcdirKarel Zak2010-05-241-5/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swaplabel: fix typo in man pageKarel Zak2010-04-071-1/+1
| | | | | Reported-by: Marcos Felipe Rasia de Mello <marcosfrm@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* swaplabel: new commandJason Borden2010-04-024-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>
* mkswap: zap bootbits on regular filesKarel Zak2010-04-021-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: move write_all() to include/writeall.hKarel Zak2010-04-011-18/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: reduce usage text widthFrancesco Cosoleto2010-03-311-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>
* mkswap: fixed strtoll() usageYann Droneaud2010-03-301-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>
* mkswap: more robust strtoull() usageKarel Zak2010-03-301-6/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: don't call blkdev_find_size()Karel Zak2010-03-111-2/+0Star
| | | | | | .. it's already called by blkdev_get_size(). Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck/mkfs/mount: unify default search paths for helpersMike Frysinger2010-02-021-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>
* build-sys: cleanup AM_CFLAGS usageKarel Zak2009-11-091-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix out-of-source buildKarel Zak2009-11-061-1/+1
| | | | | | The blkid.h file is generated and stored in $top_builddir. Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: restore device argument in mkswap.8 synopsisPeter Breitenlohner2009-11-021-0/+1
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* build-sys: add HAVE_LIBBLKID_INTERNALKarel Zak2009-10-271-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>
* mkfs.minix: fix strict-aliasing bugsKarel Zak2009-10-171-2/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.minix: fix strict-aliasing bugsKarel Zak2009-10-171-1/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Revert "build-sys: move fsck/mkfs for bfs/cramfs/minix to /usr"Karel Zak2009-10-161-7/+6Star
| | | | | | See http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2689/focus=2690 This reverts commit d4fa971c42467fb69e5d89d28e1b98c491a1505a.
* blockdev: use c.hKarel Zak2009-10-161-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.minix: fix broken zone checkingKarel Zak2009-10-152-6/+5Star
| | | | | | | | | | | | | 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>
* blockdev: fix topology ioctlsKarel Zak2009-10-151-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>
* blockdev: add topology ioctls supportKarel Zak2009-10-151-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>
* blockdev: add support for uint and ushort ioctlsKarel Zak2009-10-151-0/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: refactoring (better commands definition)Karel Zak2009-10-141-92/+162
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move fsck/mkfs for bfs/cramfs/minix to /usrMike Frysinger2009-10-121-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>
* Remove now unused <sys/ioctl.h> includesGuillem Jover2009-10-094-4/+0Star
| | | | | | Those became unused with the switch to the blkdev functions. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* build-sys: detect if volatile is availableGuillem Jover2009-10-091-4/+0Star
| | | | | | | 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>
* fdformat: fix memory leak in verify_disk()Cristian Rodríguez2009-10-061-0/+2
| | | | Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
* mkfs.cramfs: fix gcc warning (incompatible pointer type)Karel Zak2009-09-291-3/+2Star
| | | | | | | 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>
* mkswap: use libblkid to detect PTKarel Zak2009-09-292-10/+43
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: fix memory leaks, cleanup check_blocks()Karel Zak2009-09-071-5/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: unbreak -c ("check") option.Peter De Wachter2009-09-071-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>
* mkswap.8: formattingPeter Breitenlohner2009-08-171-6/+15
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* mkfs.minix.8: formattingPeter Breitenlohner2009-08-171-9/+10
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* mkfs.bfs.8: formattingPeter Breitenlohner2009-08-171-12/+9Star
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* isosize.8: formattingPeter Breitenlohner2009-08-171-8/+16
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* fsck.minix.8: formattingPeter Breitenlohner2009-08-171-3/+4
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* fdformat.8: formattingPeter Breitenlohner2009-08-171-2/+2
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>