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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* '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