Commit Graph

3796 Commits

Author SHA1 Message Date
Karel Zak 640fc1b819 build-sys: check scanf %ms modifier
Without the check libmount builds on systems that has older than 2.7
glibc are silently unsuccessful.  The missing %ms modifier will, at
least, result on such system missing output of findmnt and lsblk
commands.  If either %ms or %as modifiers are present the libmount
build is disabled.

Based on patch from: Sami Kerola <kerolasa@iki.fi>

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-10 14:42:40 +02:00
Sami Kerola bfda68fdb1 build-sys: rename BUILD_BUG_ON_ZERO definition
Definition name is changed to UL_BUILD_BUG_ON_ZERO to avoid collision
with a system header.

../include/c.h:72:1: warning: "BUILD_BUG_ON_ZERO" redefined
In file included from /usr/include/sys/sysinfo.h:25,
                 from dmesg.c:16:
/usr/include/linux/kernel.h:34:1: warning: this is the location of the previous definition

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-10 13:57:16 +02:00
Sami Kerola 13ba1df87d build-sys: enhance error message for missing libtoolize
The commit will will use `You must have libtool version...' message
when libtoolize is missing.  Earlier the error message less helpful.

./autogen.sh: line 59: test: =: unary operator expected

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-10 13:56:53 +02:00
Karel Zak e05da02020 Merge branch 'manuals' of https://github.com/kerolasa/lelux-utiliteetit
* 'manuals' of https://github.com/kerolasa/lelux-utiliteetit:
  docs: align hexdump.1 with howto-man-page.txt
  docs: align ul.1 with howto-man-page.txt
  docs: align rev.1 with howto-man-page.txt
  docs: align more.1 with howto-man-page.txt
  docs: align colrm.1 with howto-man-page.txt
  docs: align colcrt.1 with howto-man-page.txt
  docs: align col.1 with howto-man-page.txt
  docs: align wall.1 with howto-man-page.txt
  docs: align scriptreplay.1 with howto-man-page.txt
  docs: align script.1 with howto-man-page.txt
  docs: align renice.1 with howto-man-page.txt
  docs: align logger.1 with howto-man-page.txt
  docs: align vipw.8 with howto-man-page.txt
  docs: fix return value table in fsck.8
  docs: chcpu and readprofile are sysadmin utils
2011-10-10 13:27:40 +02:00
Sami Kerola 7570e15a1d docs: align hexdump.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:40 +02:00
Sami Kerola e6ed925d41 docs: align ul.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:40 +02:00
Sami Kerola 5987d1a930 docs: align rev.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:40 +02:00
Sami Kerola f4ddf6ff17 docs: align more.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:40 +02:00
Sami Kerola 960531fff5 docs: align colrm.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:40 +02:00
Sami Kerola 8220d6ca89 docs: align colcrt.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:40 +02:00
Sami Kerola d1daf8e1dd docs: align col.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:40 +02:00
Sami Kerola 7dab96af41 docs: align wall.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:39 +02:00
Sami Kerola 1aa1fbaee1 docs: align scriptreplay.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:49:04 +02:00
Sami Kerola c5e7b9fa70 docs: align script.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:32:45 +02:00
Sami Kerola 9ef94a604a docs: align renice.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:32:36 +02:00
Sami Kerola c047c42d7a docs: align logger.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:06:33 +02:00
Sami Kerola 6e34af1bcd docs: align vipw.8 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:06:33 +02:00
Sami Kerola fdbc250904 docs: fix return value table in fsck.8
Commint also has few alignments with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:05:52 +02:00
Petr Uzel 34f9b684c0 losetup: new -D option to delete all used loop devices
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-03 15:50:42 +02:00
Petr Uzel c6455a945c losetup: print verbose messages if requested
verbose can't be > 1

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-10-03 15:48:33 +02:00
Karel Zak ffbe3270f1 Merge branch 'sys-utils-again' of https://github.com/kerolasa/lelux-utiliteetit
* 'sys-utils-again' of https://github.com/kerolasa/lelux-utiliteetit:
  cytune: fix printf type warning
  docs: mention long options in cytune.8
  cytune: coding style fixes
  cytune: refactor main(), new function query_tty_stats()
  cytune: use libc error printing facilities
  cytune: check numeric user inputs
  cytune: add long options and usage()
  docs: restructure flock.1 manual page
  flock: simplify strtotimeval()
  lib: [strutils] add strtod_or_err() function
  flock: use strutils.h to check numeric user input
  flock: use sysexit.h for all exit values
  flock: use function attributes
  flock: align with howto-usage-function.txt
  flock: use libc error printing facilities
  flock: move long_options struct to function scope
  flock: fix coding style
  docs: align fallocate.1 with howto-man-page.txt
2011-10-03 15:40:15 +02:00
Ilias Mamedov f17f5f481a lsblk: add udev support
[kzak@redhat.com: - enable udev support by default
                  - don't check for libudev.h
                  - minor udev code refactoring in lsblk.c]

Signed-off-by: Ilias Mamedov <arknir@yandex.ru>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-03 14:25:43 +02:00
Karel Zak fd96508a27 docs: add prlimit to the TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 12:40:44 +02:00
Karel Zak f991d6b542 umount: add warning
It's better to inform users about reason why their request does not
makes sense :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 11:26:07 +02:00
Karel Zak d568813071 umount: use new lib/loopdev.c code
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 11:09:38 +02:00
Karel Zak eaa1c95252 mount: fix loopdev deinitialization
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 11:05:37 +02:00
Karel Zak f0d3ff0a6f libmount: support -o loop=<devname>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 01:38:38 +02:00
Karel Zak 8fbbe528a7 mount: use new lib/loopdev.c code
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 01:28:02 +02:00
Dave Reisner 12218ccde2 include,xalloc: fix whitespace to be consistent
We use spaces for the rest of this file, so the random tabs within
xstrdup stand out.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-30 00:24:16 +02:00
Dave Reisner 8ddb6b0cae include,xalloc: check for NULL before calling strdup
This fixes a segfault in mount (and possibly elsewhere) when invoked
without a -t parameter.

Broken in 7ef9fd7 when the common xalloc.h libs were introduced.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-30 00:24:05 +02:00
Karel Zak 269943ff0f tests: add missing file
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 00:22:22 +02:00
Karel Zak 365e5a7c54 libmount: use loopdev debug facility
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-29 23:29:46 +02:00
Karel Zak aee31ddc59 lib,loopdev: add debugu messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-29 23:28:36 +02:00
Sami Kerola 16311847ae docs: chcpu and readprofile are sysadmin utils
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:52:34 +02:00
Sami Kerola a26acddbb7 cytune: fix printf type warning
conversion specifies type 'unsigned long' but the argument has type 'unsigned long *'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola 834eb52124 docs: mention long options in cytune.8
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola 6607ec58f3 cytune: coding style fixes
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola b126827452 cytune: refactor main(), new function query_tty_stats()
This commit also moves global variables to the beginning of the
file, or to function scope where they belong.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola 0b7f50384d cytune: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola 29d2e044e7 cytune: check numeric user inputs
Checks use strtol_or_err() from strutils.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola ace84ba0f0 cytune: add long options and usage()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola e9da7722a0 docs: restructure flock.1 manual page
The commit aligns manual page with howto-man-page.txt, and adds example
section which I hope makes usage of this command easier.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola 605325b23b flock: simplify strtotimeval()
Retire private string to number conversion and use strtod_or_err() instead.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola a9f97001c3 lib: [strutils] add strtod_or_err() function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola 37bb0ce812 flock: use strutils.h to check numeric user input
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola 56d45cfabe flock: use sysexit.h for all exit values
Additionally enhance readability of complex double "if shorthand's" by
making the segment to be few normal "if's".

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola e8cea66966 flock: use function attributes
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:27 +02:00
Sami Kerola dc36ee2a4c flock: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:45:20 +02:00
Sami Kerola d4eafec4d2 flock: use libc error printing facilities
Retire global progname variable and use warn{,x} and err{,x}
functions. As a side effect of using err function the occurences of
err variable had to be converted to referrals to errno variable.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:25:16 +02:00
Sami Kerola d89bfedff5 flock: move long_options struct to function scope
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:22:33 +02:00