Commit Graph

3836 Commits

Author SHA1 Message Date
Sami Kerola 28e91b8395 ldattach: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:57 +01:00
Sami Kerola c74138a1e5 docs: add long options to readprofile.8
Additionally align with with howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:57 +01:00
Sami Kerola a3f0ea51e4 readprofile: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:56 +01:00
Sami Kerola c416814a6b readprofile: use libc error printing facilities
This commit also changes all exit values to be symbolic.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:56 +01:00
Sami Kerola 443f731303 readprofile: add long options
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:56 +01:00
Sami Kerola 8de4751a3f docs: align tunelp.8 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:56 +01:00
Sami Kerola 42eb213e28 docs: add long options to tunelp.8
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:56 +01:00
Sami Kerola a21108babf tunelp: add long options and align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:56 +01:00
Sami Kerola 915b4bacae tunelp: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:06 +01:00
Sami Kerola 130314aa70 tunelp: use symbolic exit values
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-01 21:42:20 +01:00
Sami Kerola 61319c6e3e tunelp: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-01 21:42:16 +01:00
Sami Kerola 0fbd4c8572 switch_root: add nls support
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-30 14:47:31 +01:00
Sami Kerola ed8d2938f3 switch_root: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-30 14:45:14 +01:00
Sami Kerola 6a87798a53 unshare: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-30 14:35:06 +01:00
Sami Kerola 0e00261d2e rtcwake: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-30 14:23:54 +01:00
Sami Kerola cbfa325318 setsid: add long options and fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-30 14:08:33 +01:00
Davidlohr Bueso 6bac2825af 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>
2011-10-21 23:19:51 +02:00
Karel Zak 6a2f2f58a4 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>
2011-10-21 00:37:06 +02:00
Harald Hoyer acb03ad46a 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>
2011-10-20 12:27:35 +02:00
Karel Zak 918e427125 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>
2011-10-17 18:58:03 +02:00
Karel Zak ff4c00f94a 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>
2011-10-17 13:27:21 +02:00
Davidlohr Bueso af7df9ee67 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>
2011-10-17 11:06:48 +02:00
Petr Uzel cf48ee22d1 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>
2011-10-17 11:06:36 +02:00
Petr Uzel 8cbe756a63 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>
2011-10-17 11:06:33 +02:00
Karel Zak 8176a34404 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>
2011-10-12 10:25:01 +02:00
Davidlohr Bueso a883c6349c 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>
2011-10-12 10:01:26 +02:00
Dave Reisner c8ea35145e include/loopdev.h: add missing function prototype
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-12 10:01:09 +02:00
Karel Zak 66388d95fc docs: update TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-11 16:41:34 +02:00
Karel Zak 3d27b76ac1 lscpu: add columns description to help, fix header for parsable output
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-11 12:23:23 +02:00
Heiko Carstens 67f1d481a4 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>
2011-10-11 12:19:41 +02:00
Heiko Carstens 5f2ce40467 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>
2011-10-11 11:43:42 +02:00
Heiko Carstens 6dafef6556 lscpu: add s390 kvm test case
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2011-10-11 11:36:06 +02:00
Heiko Carstens f23608b892 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>
2011-10-11 11:36:05 +02:00
Heiko Carstens 847b982ee3 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>
2011-10-11 11:36:03 +02:00
Karel Zak eb9d3706aa mountpoint: support symbolic and relative paths
Reported-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-11 11:26:31 +02:00
Karel Zak b031befc25 Revert "mountpoint: refactor exit path"
This change is unnecessary, we can use libmount stuff for everything.

This reverts commit b16b56ec55.
2011-10-11 11:14:31 +02:00
Dave Reisner b16b56ec55 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>
2011-10-11 11:03:45 +02:00
Karel Zak dfd2c71468 mountpoint: fallback on stat when /proc isn't mounted
Reported-by: <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-11 10:47:44 +02:00
Dave Reisner 7982e85a61 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>
2011-10-11 09:56:07 +02:00
Sami Kerola f65b3bb625 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>
2011-10-10 14:51:26 +02:00
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