* multipurpose binaries (symlinks) suck when used with autotools
* swapoff shares small subset of the code with swapon
* usage() and 'struct option' is unnecessary complex when shared
* shorter and simple code is easer to maintain...
Signed-off-by: Karel Zak <kzak@redhat.com>
For: util-linux
This patch adds a tiny tool "wdctl" which may be used to query the
status of Linux watchdog devices (/dev/watchdog).
This will simply query all fields that may be queried from the
device and print them nicely formatted.
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Now we have three versions of the mount(8) utility
* old mount(8)
--enable-mount [default]
* old mount(8) linked with libmount
This is this is necessary for systems without mtab file.
--enable-libmount-mount
- new mount(8)
This is completely new pure-libmount based mount(8).
--enable-new-mount
Signed-off-by: Karel Zak <kzak@redhat.com>
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>
chcpu can modify the logical state of CPUs. It can enable and disable CPUs,
scan for new CPUs, change the CPU dispatching mode of the underlying
hypervisor and request (configure) or give logical CPUs back (deconfigure)
to the the underlying hypervisor.
This is quite useful if you work a lot with virtual servers, since doing all
the configuration stuff directly via sysfs becomes a pain.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This is libmount based re-implementation of the mountpoint(1) command.
The original implementation is maintained in sysvinit suite.
The mountpoint(1) in util-linux is not enabled by default (for now) --
use --enable-mountpoint to enable the util.
Signed-off-by: Karel Zak <kzak@redhat.com>
fstrim is used on a mounted filesystem to discard (or "trim") blocks
which are not in use by the filesystem. This is useful for
solid-state drives (SSDs) and thinly-provisioned storage
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
[kzak@redhat.com: - cleanup
- add long options
- add note about DM to the man page
- use err.h and nls.h]
Signed-off-by: Hajime Taira <htaira@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
New utility allows to run process with separate mount, UTC, IPC or
network namespaces.
[kzak@redhat.com: - some cosmetic changes in usage() and err() usage
- move "if BUILD_UNSHARE" to separate place in Makefile.am
- add unshare to .gitignore]
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
The fallocate(1) utility is used to preallocate blocks to a file.
This can be useful for virtual images, database files, testing, etc.
Normally we'd hope that various tools will start using preallocation
internally, but until then such a utility may be useful, and could be
scripted as well.
The original Eric's version is available at:
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2490
This version:
- checks for fallocate glibc function and kernel syscall
- does not provide a fallback and does not call posix_fallocate()
- adds long options
- uses err.h for errro messages
- adds NLS support
- cleanups man page
Co-Author: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Copied from Dracut project:
git://dracut.git.sourceforge.net/gitroot/dracut
switch_root history in dracut.git repository:
$ git shortlog switch_root.c
Harald Hoyer (5):
replace switch_root shell script with binary
add \n to switch_root
use switch_root code from http://pjones.fedorapeople.org/mkstart/usr/lib/mkstart/switchroot.c
mount move instead of umount and fix the search for fallback inits
setsid() and set controlling terminal for real /sbin/init
Victor Lowther (2):
Simplify switch_root.c a bit
Remove all files on the initramfs before switching root
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This patch moves pivot_root.{8,c) from mount/ to sys-utils/ directory.
There is not ant relation between pivot_root source code and the rest of
code in the mount.
Signed-off-by: Karel Zak <kzak@redhat.com>
Small patch to create an application that can easily create ad-hoc ipc
resources, along with man page.
[kzak@redhat.com: - rename from ipccreat to ipcmk
- minor coding style changes]
Signed-off-by: Hayden James <hayden.james@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>