]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
13 years agoldattach: add default case to switches
Sami Kerola [Wed, 2 Nov 2011 18:15:27 +0000 (19:15 +0100)] 
ldattach: add default case to switches

The warnings bellow are about impossible case, so makign abort() as
default seems correct.

ldattach.c:305:2: warning: switch missing default case [-Wswitch-default]
ldattach.c:313:2: warning: switch missing default case [-Wswitch-default]
ldattach.c:321:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoldattach: convert debug macro to function
Sami Kerola [Wed, 2 Nov 2011 18:07:34 +0000 (19:07 +0100)] 
ldattach: convert debug macro to function

warning: ISO C does not permit named variadic macros

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoldattach: check numeric user inputs with strtol_or_err
Sami Kerola [Tue, 1 Nov 2011 20:32:54 +0000 (21:32 +0100)] 
ldattach: check numeric user inputs with strtol_or_err

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoldattach: align with howto-usage-function.txt
Sami Kerola [Tue, 1 Nov 2011 20:17:58 +0000 (21:17 +0100)] 
ldattach: align with howto-usage-function.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoldattach: fix coding style
Sami Kerola [Tue, 1 Nov 2011 19:45:19 +0000 (20:45 +0100)] 
ldattach: fix coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: add long options to readprofile.8
Sami Kerola [Mon, 31 Oct 2011 21:13:24 +0000 (22:13 +0100)] 
docs: add long options to readprofile.8

Additionally align with with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoreadprofile: fix coding style
Sami Kerola [Mon, 31 Oct 2011 20:52:56 +0000 (21:52 +0100)] 
readprofile: fix coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoreadprofile: use libc error printing facilities
Sami Kerola [Mon, 31 Oct 2011 20:38:11 +0000 (21:38 +0100)] 
readprofile: use libc error printing facilities

This commit also changes all exit values to be symbolic.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoreadprofile: add long options
Sami Kerola [Mon, 31 Oct 2011 20:12:30 +0000 (21:12 +0100)] 
readprofile: add long options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align tunelp.8 with howto-man-page.txt
Sami Kerola [Sun, 30 Oct 2011 15:41:21 +0000 (16:41 +0100)] 
docs: align tunelp.8 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: add long options to tunelp.8
Sami Kerola [Sun, 30 Oct 2011 15:25:16 +0000 (16:25 +0100)] 
docs: add long options to tunelp.8

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotunelp: add long options and align with howto-usage-function.txt
Sami Kerola [Sun, 30 Oct 2011 15:03:19 +0000 (16:03 +0100)] 
tunelp: add long options and align with howto-usage-function.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotunelp: use libc error printing facilities
Sami Kerola [Sun, 30 Oct 2011 14:19:59 +0000 (15:19 +0100)] 
tunelp: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotunelp: use symbolic exit values
Sami Kerola [Sun, 30 Oct 2011 14:08:18 +0000 (15:08 +0100)] 
tunelp: use symbolic exit values

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotunelp: fix coding style
Sami Kerola [Sun, 30 Oct 2011 14:02:00 +0000 (15:02 +0100)] 
tunelp: fix coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoswitch_root: add nls support
Sami Kerola [Sun, 30 Oct 2011 13:47:31 +0000 (14:47 +0100)] 
switch_root: add nls support

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoswitch_root: align with howto-usage-function.txt
Sami Kerola [Sun, 30 Oct 2011 13:45:14 +0000 (14:45 +0100)] 
switch_root: align with howto-usage-function.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agounshare: align with howto-usage-function.txt
Sami Kerola [Sun, 30 Oct 2011 13:35:06 +0000 (14:35 +0100)] 
unshare: align with howto-usage-function.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agortcwake: align with howto-usage-function.txt
Sami Kerola [Sun, 30 Oct 2011 13:23:54 +0000 (14:23 +0100)] 
rtcwake: align with howto-usage-function.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agosetsid: add long options and fix coding style
Sami Kerola [Sun, 30 Oct 2011 13:08:33 +0000 (14:08 +0100)] 
setsid: add long options and fix coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoprlimit: new command
Davidlohr Bueso [Wed, 19 Oct 2011 20:02:35 +0000 (16:02 -0400)] 
prlimit: new command

This program uses the prlimit() system call to get and/or set resource limits
for a given process.

[kzak@redhat,com: - improve <soft:hard> parsing,
                  - use short cmdline options compatible with ulimits
                  - add --verbose mode
                  - fix gcc warnings]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoblkid: print ID_PART_ENTRY_* for small devices
Karel Zak [Thu, 20 Oct 2011 22:12:47 +0000 (00:12 +0200)] 
blkid: print ID_PART_ENTRY_* for small devices

The current optimization for small devices (1.4MiB) is broken. It
checks for partition table, but if nothing is detected then details
(ID_PART_ENTRY_*) about the current partition are not gathered.

The optimization should be enabled for small *whole* disks only.

Reported-by: David Zeuthen <davidz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoswitch_root: handle /run and do not mount over existing mounts
Harald Hoyer [Thu, 20 Oct 2011 08:05:20 +0000 (10:05 +0200)] 
switch_root: handle /run and do not mount over existing mounts

Handle /run just like /dev, /sys and /proc

Do not mount move, if there is already something mounted on the
destination folder.

Signed-off-by: Harald Hoyer <harald@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: remounting tmpfs read-write hangs (selinux)
Karel Zak [Mon, 17 Oct 2011 16:58:03 +0000 (18:58 +0200)] 
mount: remounting tmpfs read-write hangs (selinux)

Reported-by: Petr Pisar <ppisar@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=746705
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: unable to umount nfs shares using the force option
Karel Zak [Mon, 17 Oct 2011 11:27:21 +0000 (13:27 +0200)] 
libmount: unable to umount nfs shares using the force option

Reported-by: Federico Simoncelli <fsimonce@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=745746
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib,strutils: add default value to parse_range()
Davidlohr Bueso [Fri, 14 Oct 2011 20:32:15 +0000 (16:32 -0400)] 
lib,strutils: add default value to parse_range()

This function currently sets the low or high values to 0 when the string doesn't
contain a value, like '123:' or ':123'. In order to make it more flexible, we allow it
to be passed an arbitrary value.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofstrim: fix section number in referral to manpage
Petr Uzel [Thu, 13 Oct 2011 13:10:45 +0000 (15:10 +0200)] 
fstrim: fix section number in referral to manpage

Reported-by: Roeland Jansen <roeland@linux-it.nl>
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=723877

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agortcwake: fix crash (invalid free)
Petr Uzel [Thu, 13 Oct 2011 12:40:31 +0000 (14:40 +0200)] 
rtcwake: fix crash (invalid free)

~ $ rtcwake -d X -s 10
*** glibc detected *** rtcwake: munmap_chunk(): invalid pointer: 0x00007fff839253c3 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x733b6)[0x7f582677a3b6]
rtcwake[0x4022d5]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f5826725bfd]
rtcwake[0x4016b9]
======= Memory map: ========
<SNIP>

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agofdisk: don't shorten long path to disk device
Karel Zak [Wed, 12 Oct 2011 08:15:58 +0000 (10:15 +0200)] 
fdisk: don't shorten long path to disk device

Reported-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib,strutils: share parse_range()
Davidlohr Bueso [Wed, 12 Oct 2011 03:18:12 +0000 (23:18 -0400)] 
lib,strutils: share parse_range()

This function is currently only being used by partx(8), but it's handy and
generic enough that we can use it elsewhere as well.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agoinclude/loopdev.h: add missing function prototype
Dave Reisner [Tue, 11 Oct 2011 18:27:47 +0000 (14:27 -0400)] 
include/loopdev.h: add missing function prototype

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agodocs: update TODO
Karel Zak [Tue, 11 Oct 2011 14:41:34 +0000 (16:41 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolscpu: add columns description to help, fix header for parsable output
Karel Zak [Tue, 11 Oct 2011 10:23:23 +0000 (12:23 +0200)] 
lscpu: add columns description to help, fix header for parsable output

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolscpu: man page update
Heiko Carstens [Mon, 10 Oct 2011 08:59:44 +0000 (10:59 +0200)] 
lscpu: man page update

Rather large man page update which adds more information.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agochcpu: man page update
Heiko Carstens [Mon, 10 Oct 2011 08:59:43 +0000 (10:59 +0200)] 
chcpu: man page update

Move chcpu man page to section 8 (admin commands) where it belongs.
Also update the contents of the man page.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
13 years agolscpu: add s390 kvm test case
Heiko Carstens [Mon, 10 Oct 2011 08:59:42 +0000 (10:59 +0200)] 
lscpu: add s390 kvm test case

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
13 years agolscpu: fix typo in help text
Heiko Carstens [Mon, 10 Oct 2011 08:59:40 +0000 (10:59 +0200)] 
lscpu: fix typo in help text

Add missing 'n' in help text for extended output line.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
13 years agolscpu: switch Yes/No output to lower case
Heiko Carstens [Mon, 10 Oct 2011 08:59:39 +0000 (10:59 +0200)] 
lscpu: switch Yes/No output to lower case

Some people complained about the first letter of Yes/No as seen in the
online and configured column in the human readabe output being a capital
letter instead of the expected lower case letter.
So let's try to make everbody happy and convert them to lower case.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
13 years agomountpoint: support symbolic and relative paths
Karel Zak [Tue, 11 Oct 2011 09:26:31 +0000 (11:26 +0200)] 
mountpoint: support symbolic and relative paths

Reported-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoRevert "mountpoint: refactor exit path"
Karel Zak [Tue, 11 Oct 2011 09:14:31 +0000 (11:14 +0200)] 
Revert "mountpoint: refactor exit path"

This change is unnecessary, we can use libmount stuff for everything.

This reverts commit b16b56ec55507b6b83e0d35e3cefeb16367f3363.

13 years agomountpoint: refactor exit path
Dave Reisner [Mon, 10 Oct 2011 23:14:15 +0000 (19:14 -0400)] 
mountpoint: refactor exit path

There's only one condition for which we declare success, but many for
failure. Initialize rc as failure and set to success on this single
condition. In all cases, jump to a label to exit instead of exiting
immediately. This will be used later on to ease cleanup of any heap
allocations.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomountpoint: fallback on stat when /proc isn't mounted
Karel Zak [Tue, 11 Oct 2011 08:47:44 +0000 (10:47 +0200)] 
mountpoint: fallback on stat when /proc isn't mounted

Reported-by: <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomountpoint: return dev_t from dir_to_device
Dave Reisner [Sun, 9 Oct 2011 03:31:50 +0000 (23:31 -0400)] 
mountpoint: return dev_t from dir_to_device

The string returned from this function was never of much use other than
to stat the path when the user requested a major:minor pair beyond the
true/false exit. Save some processing and directly returning the dev_t
on success, and an impossible value on failure.

[kzak@redhat.com: - use 0 as dir_to_device() return value on failure]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: inform about depencency to /sys/dev/block
Sami Kerola [Wed, 5 Oct 2011 13:37:48 +0000 (15:37 +0200)] 
lsblk: inform about depencency to /sys/dev/block

The lsblk depends on /sys/dev/block/ symlinks, which appeared in
kernel 2.6.27.  Users with old, or non-sysfs configured, kernel
got ealier message

lsblk: md0: failed to initialize sysfs handler
lsblk: xvda: failed to initialize sysfs handler
[...]

that I found a little too difficult to understand.  This patch will
change the message to

lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory

and informs in manual page what could be reason to that.

[kzak@redhat.com: - use access() rather than opendir()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: check scanf %ms modifier
Karel Zak [Sat, 1 Oct 2011 13:33:53 +0000 (15:33 +0200)] 
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>
13 years agobuild-sys: rename BUILD_BUG_ON_ZERO definition
Sami Kerola [Sat, 1 Oct 2011 11:58:51 +0000 (13:58 +0200)] 
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>
13 years agobuild-sys: enhance error message for missing libtoolize
Sami Kerola [Sat, 1 Oct 2011 11:18:17 +0000 (13:18 +0200)] 
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>
13 years agoMerge branch 'manuals' of https://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Mon, 10 Oct 2011 11:27:40 +0000 (13:27 +0200)] 
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

13 years agodocs: align hexdump.1 with howto-man-page.txt
Sami Kerola [Sun, 18 Sep 2011 12:26:07 +0000 (14:26 +0200)] 
docs: align hexdump.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align ul.1 with howto-man-page.txt
Sami Kerola [Sun, 18 Sep 2011 11:24:10 +0000 (13:24 +0200)] 
docs: align ul.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align rev.1 with howto-man-page.txt
Sami Kerola [Sun, 18 Sep 2011 11:10:27 +0000 (13:10 +0200)] 
docs: align rev.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align more.1 with howto-man-page.txt
Sami Kerola [Sun, 18 Sep 2011 11:06:44 +0000 (13:06 +0200)] 
docs: align more.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align colrm.1 with howto-man-page.txt
Sami Kerola [Sun, 18 Sep 2011 10:20:54 +0000 (12:20 +0200)] 
docs: align colrm.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align colcrt.1 with howto-man-page.txt
Sami Kerola [Sun, 18 Sep 2011 10:09:10 +0000 (12:09 +0200)] 
docs: align colcrt.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align col.1 with howto-man-page.txt
Sami Kerola [Sun, 18 Sep 2011 09:49:08 +0000 (11:49 +0200)] 
docs: align col.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align wall.1 with howto-man-page.txt
Sami Kerola [Sat, 17 Sep 2011 21:55:37 +0000 (23:55 +0200)] 
docs: align wall.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align scriptreplay.1 with howto-man-page.txt
Sami Kerola [Sat, 17 Sep 2011 21:44:33 +0000 (23:44 +0200)] 
docs: align scriptreplay.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align script.1 with howto-man-page.txt
Sami Kerola [Sat, 17 Sep 2011 21:12:17 +0000 (23:12 +0200)] 
docs: align script.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align renice.1 with howto-man-page.txt
Sami Kerola [Sat, 17 Sep 2011 20:48:04 +0000 (22:48 +0200)] 
docs: align renice.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align logger.1 with howto-man-page.txt
Sami Kerola [Sat, 17 Sep 2011 20:09:37 +0000 (22:09 +0200)] 
docs: align logger.1 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align vipw.8 with howto-man-page.txt
Sami Kerola [Sat, 17 Sep 2011 19:28:12 +0000 (21:28 +0200)] 
docs: align vipw.8 with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: fix return value table in fsck.8
Sami Kerola [Sat, 17 Sep 2011 19:11:51 +0000 (21:11 +0200)] 
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>
13 years agolosetup: new -D option to delete all used loop devices
Petr Uzel [Fri, 30 Sep 2011 10:05:26 +0000 (12:05 +0200)] 
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>
13 years agolosetup: print verbose messages if requested
Petr Uzel [Fri, 30 Sep 2011 10:05:25 +0000 (12:05 +0200)] 
losetup: print verbose messages if requested

verbose can't be > 1

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agoMerge branch 'sys-utils-again' of https://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Mon, 3 Oct 2011 13:40:15 +0000 (15:40 +0200)] 
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

13 years agolsblk: add udev support
Ilias Mamedov [Mon, 3 Oct 2011 12:22:42 +0000 (14:22 +0200)] 
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>
13 years agodocs: add prlimit to the TODO file
Karel Zak [Fri, 30 Sep 2011 10:40:44 +0000 (12:40 +0200)] 
docs: add prlimit to the TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoumount: add warning
Karel Zak [Fri, 30 Sep 2011 09:26:07 +0000 (11:26 +0200)] 
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>
13 years agoumount: use new lib/loopdev.c code
Karel Zak [Fri, 30 Sep 2011 09:09:38 +0000 (11:09 +0200)] 
umount: use new lib/loopdev.c code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: fix loopdev deinitialization
Karel Zak [Fri, 30 Sep 2011 09:05:37 +0000 (11:05 +0200)] 
mount: fix loopdev deinitialization

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: support -o loop=<devname>
Karel Zak [Thu, 29 Sep 2011 23:38:38 +0000 (01:38 +0200)] 
libmount: support -o loop=<devname>

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: use new lib/loopdev.c code
Karel Zak [Thu, 29 Sep 2011 23:28:02 +0000 (01:28 +0200)] 
mount: use new lib/loopdev.c code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoinclude,xalloc: fix whitespace to be consistent
Dave Reisner [Thu, 29 Sep 2011 18:56:42 +0000 (14:56 -0400)] 
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>
13 years agoinclude,xalloc: check for NULL before calling strdup
Dave Reisner [Thu, 29 Sep 2011 18:56:41 +0000 (14:56 -0400)] 
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>
13 years agotests: add missing file
Karel Zak [Thu, 29 Sep 2011 22:22:22 +0000 (00:22 +0200)] 
tests: add missing file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: use loopdev debug facility
Karel Zak [Thu, 29 Sep 2011 21:29:46 +0000 (23:29 +0200)] 
libmount: use loopdev debug facility

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib,loopdev: add debugu messages
Karel Zak [Thu, 29 Sep 2011 21:28:36 +0000 (23:28 +0200)] 
lib,loopdev: add debugu messages

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: chcpu and readprofile are sysadmin utils
Sami Kerola [Sat, 17 Sep 2011 18:46:34 +0000 (20:46 +0200)] 
docs: chcpu and readprofile are sysadmin utils

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agocytune: fix printf type warning
Sami Kerola [Sun, 25 Sep 2011 20:49:52 +0000 (22:49 +0200)] 
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>
13 years agodocs: mention long options in cytune.8
Sami Kerola [Sun, 25 Sep 2011 20:28:51 +0000 (22:28 +0200)] 
docs: mention long options in cytune.8

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agocytune: coding style fixes
Sami Kerola [Sun, 25 Sep 2011 20:16:53 +0000 (22:16 +0200)] 
cytune: coding style fixes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agocytune: refactor main(), new function query_tty_stats()
Sami Kerola [Sun, 25 Sep 2011 20:13:14 +0000 (22:13 +0200)] 
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>
13 years agocytune: use libc error printing facilities
Sami Kerola [Sun, 25 Sep 2011 20:10:37 +0000 (22:10 +0200)] 
cytune: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agocytune: check numeric user inputs
Sami Kerola [Sun, 25 Sep 2011 20:09:29 +0000 (22:09 +0200)] 
cytune: check numeric user inputs

Checks use strtol_or_err() from strutils.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agocytune: add long options and usage()
Sami Kerola [Sun, 25 Sep 2011 20:08:42 +0000 (22:08 +0200)] 
cytune: add long options and usage()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: restructure flock.1 manual page
Sami Kerola [Sun, 25 Sep 2011 11:00:15 +0000 (13:00 +0200)] 
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>
13 years agoflock: simplify strtotimeval()
Sami Kerola [Sun, 25 Sep 2011 10:03:30 +0000 (12:03 +0200)] 
flock: simplify strtotimeval()

Retire private string to number conversion and use strtod_or_err() instead.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolib: [strutils] add strtod_or_err() function
Sami Kerola [Sun, 25 Sep 2011 09:03:07 +0000 (11:03 +0200)] 
lib: [strutils] add strtod_or_err() function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoflock: use strutils.h to check numeric user input
Sami Kerola [Wed, 21 Sep 2011 20:26:05 +0000 (22:26 +0200)] 
flock: use strutils.h to check numeric user input

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoflock: use sysexit.h for all exit values
Sami Kerola [Wed, 21 Sep 2011 19:56:45 +0000 (21:56 +0200)] 
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>
13 years agoflock: use function attributes
Sami Kerola [Wed, 21 Sep 2011 19:38:08 +0000 (21:38 +0200)] 
flock: use function attributes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoflock: align with howto-usage-function.txt
Sami Kerola [Wed, 21 Sep 2011 19:27:42 +0000 (21:27 +0200)] 
flock: align with howto-usage-function.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoflock: use libc error printing facilities
Sami Kerola [Wed, 21 Sep 2011 19:15:53 +0000 (21:15 +0200)] 
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>
13 years agoflock: move long_options struct to function scope
Sami Kerola [Wed, 21 Sep 2011 18:55:50 +0000 (20:55 +0200)] 
flock: move long_options struct to function scope

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoflock: fix coding style
Sami Kerola [Wed, 21 Sep 2011 18:52:31 +0000 (20:52 +0200)] 
flock: fix coding style

Sanitize indentation, spacing, brace positions, comment line lenghts and
positions etc. This commit does not change a thing in code.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: align fallocate.1 with howto-man-page.txt
Sami Kerola [Mon, 19 Sep 2011 19:19:47 +0000 (21:19 +0200)] 
docs: align fallocate.1 with howto-man-page.txt

Add also earlierly missing --version to the manual.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotests: add loopdev libmount test
Karel Zak [Thu, 29 Sep 2011 18:50:27 +0000 (20:50 +0200)] 
tests: add loopdev libmount test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: support {offset,sizelimit}= foor loopdevs
Karel Zak [Thu, 29 Sep 2011 18:50:08 +0000 (20:50 +0200)] 
libmount: support {offset,sizelimit}= foor loopdevs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add function to parse offsets/sizes
Karel Zak [Thu, 29 Sep 2011 15:48:03 +0000 (17:48 +0200)] 
libmount: add function to parse offsets/sizes

13 years agoipcrm: fix wrong subject in error messages for -m, -q, -s id options
Francesco Cosoleto [Wed, 28 Sep 2011 14:25:31 +0000 (16:25 +0200)] 
ipcrm: fix wrong subject in error messages for -m, -q, -s id options

This makes error messages print 'id' instead of 'key' using id options.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>