summaryrefslogtreecommitdiffstats
path: root/disk-utils
Commit message (Collapse)AuthorAgeFilesLines
* raw: remove constants from message strings; undo some abbrevsBenno Schulenberg2011-03-081-14/+13Star
| | | | | | | | Having a constant embedded within a message string prevents gettext from picking up the rest of the string. Also, translators may wish to change word order; using a constant as a prefix or postfix makes this impossible. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* move struct option to .rodataKarel Zak2011-03-032-2/+2
| | | | | | | It does not make sense to have writable large arrays of "struct option" on the stack. Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: fix compiler warningKarel Zak2011-02-211-1/+1
| | | | | | | mkswap.c: In function ‘main’: mkswap.c:646:6: warning: too few arguments for format Signed-off-by: Karel Zak <kzak@redhat.com>
* doc: mention mkswap long options in man pageSami Kerola2011-02-211-35/+21Star
| | | | | | | | | | | The update will also expand kernel version numbers to have a month and year next to them. This should help users can get idea how long, for example, swap v1 has been around. [kzak@redhat.com: - modify synopsis, remove duplicate info about page size] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: coding style unificationSami Kerola2011-02-211-21/+30
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkswap: fix to compiler warningsSami Kerola2011-02-211-5/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkswap: use EXIT_ valuesSami Kerola2011-02-211-4/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkswap: support long options and check user inputsSami Kerola2011-02-212-73/+76
| | | | | | | [kzak@redhat-com: - mimor changes to usage()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: use xallocSami Kerola2011-02-211-7/+4Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkswap: use libc error messaging facilitiesSami Kerola2011-02-211-95/+62Star
| | | | | | | [kzak@redhat.com: - use "%s from %s" for -V output] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: provide alternatives for err, errx, warn and warnxFabian Groffen2011-02-141-1/+0Star
| | | | | | | | Solaris lacks err, errx, warn and warnx. This also means the err.h header doesn't exist. Removed err.h include from all files, and included err.h from c.h instead if it exists, otherwise alternatives are provided. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* mkfs.minix: general cleanupsDavidlohr Bueso2011-02-141-140/+142
| | | | | | | This patch provides some minor code fixes: add/remove some macros and close the device after usage. Also modifies usage() and changes main()'s indentation to 8-characters. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mkfs.cramfs: use symbolic exit codesSami Kerola2011-01-171-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>
* mkfs: general cleanupsDavidlohr Bueso2011-01-171-18/+7Star
| | | | | | Use xalloc, remove unused headers, use EXIT_* constants. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* disk-utils: fix manpage typosDavidlohr Bueso2011-01-172-2/+2
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* 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>