summaryrefslogtreecommitdiffstats
path: root/sys-utils
Commit message (Collapse)AuthorAgeFilesLines
* lscpu: improve --sysroot codeKarel Zak2010-06-011-35/+73
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: cleanup used namesKarel Zak2010-06-011-114/+115
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: cleanup path_scanstr()Karel Zak2010-06-011-8/+33
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: replace ../ with $top_srcdirKarel Zak2010-05-241-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rdev: remove this deprecated commandKarel Zak2010-05-184-504/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: check for number of argumentsKarel Zak2010-05-141-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsfreeze: new commandHajime Taira2010-05-144-2/+210
| | | | | | | | | | [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>
* unshare: drop potential euid privileges before execKarel Zak2010-05-062-0/+10
| | | | | | | | | | | This patch drops potential euid privileges before executing the target program. This allows to setuid unshare. The unshare(1) is still distributed as non-setuid program. Based on patch from Martin Pohlack <mp26@os.inf.tu-dresden.de>. Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: add disable action to rtcwake man pageMarek Otahal2010-04-231-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake : add disable action for rtc alarmMarek Otahal2010-04-231-1/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: add --dry-run optionKarel Zak2010-04-082-19/+37
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: does miss the "off" optionKarel Zak2010-04-081-5/+19
| | | | | | Reported-by: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=580296 Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: support suffixes for --offset and --lenghtKarel Zak2010-03-303-40/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: fix cpuid opcode detectionHenne Vogelsang2010-03-011-1/+1
| | | | | | | | | Fixes commit c9239f23acdc8b50f8bcbfadf967c6a490fd4693. The author didn't care for matching constraints when resorting the register constraints. The eax register (with the cpuid opcode) is now in operand 1, not zero anymore. Signed-off-by: Henne Vogelsang <hvogel@opensuse.org>
* ldattach: prints help to stdoutKarel Zak2010-03-011-5/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ldattach: add --iflag command line optionTilman Schmidt2010-03-012-4/+68
| | | | | | | | | | | | | Add a command line option '-i' / '--iflag' for setting or clearing input flags on the serial device before attaching the line discipline. [kzak@redhat.com: - use generic functions for work with iflags table - add list of iflags to usage/help output - move iflags parsing to separate function] Impact: added functionality Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Karel Zak <kzak@redhat.com>
* ldattach: create a generic functions for name=value tablesKarel Zak2010-03-011-14/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: add {32,64}-bit CPU modes detectionKarel Zak2010-01-071-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add "CPU op-mode(s):" field that prints all supported CPU operation modes. The field is based on CPU flags: rm (real mode) 16-bit tm (transparent mode) 32-bit lm (long mode) 64-bit Example: $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit CPU(s): 2 Thread(s) per core: 1 Core(s) per socket: 2 CPU socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 15 Stepping: 11 CPU MHz: 1600.000 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 4096K Signed-off-by: Karel Zak <kzak@redhat.com>
* flock: fix hang when parent ignores SIGCHLDMike Frysinger2009-12-071-1/+9
| | | | | | | | | | | | If flock is executed from a process which has set SIGCHLD to SIG_IGN, then flock will eat cpu and hang indefinitely if given a command to execute. So before we fork(), make sure to set SIGCHLD handling back to the default so that the later waitpid() doesn't freak out on us. [kzak@redhat.com: - add a check for waitpid() return value] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* switch_root: add note about subroots to switch_root.8Karel Zak2009-11-201-0/+13
| | | | | | Based on patch from Daniel Drake <dsd@laptop.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* Revert "switch_root: add subroot support"Karel Zak2009-11-201-76/+5Star
| | | | | | | | | | | | | This reverts commit a692a8745941a192528c5e2a05de97155ba586f9. On Wed, Nov 18, 2009 at 03:33:12PM +0000, Daniel Drake wrote: > Booting into a system this way just leads to problems because > you cannot remount the root read-only at shutdown (leading to unclean > shutdowns). > Miklos Szeredi pointed out a trick to turn any directory into a > mount point which avoids this problem. Therefore we can simplify > switch_root again and simply document that its users should set
* dmesg: fix typo in man pageKen Kopin2009-10-191-1/+1
| | | | Signed-off-by: LaMont Jones <lamont@debian.org>
* ldattach: use c.hKarel Zak2009-10-161-4/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* switch_root: remove TIOCSCTTY and setsid()Karel Zak2009-10-091-7/+0Star
| | | | | | | | | requested by dracut developers because: bash: cannot set terminal process group (-1): Inappropriate ioctl for device Addresses-Red-Hat-Bug: #519237 Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: use __GLIBC__ instead of obsolete __GNU_LIBRARY__Guillem Jover2009-10-091-3/+1Star
| | | | | | | | The latter is obsolete and it's currently defined to 6 for historical reasons (as per comment in <features.h>) instead of 2 as what would be expected. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* build-sys: check for union semun instead of using _SEM_SEMUN_UNDEFINEDGuillem Jover2009-10-092-6/+2Star
| | | | | | | | | | | | | | Older versions of glibc used to declare ‘union semun’ in <sys/sem.h>, but POSIX.1-2001 requires the caller to declare it instead. Later versions of glibc started defining _SEM_SEMUN_UNDEFINED to note that the union was not being declared, but conforming systems are not required to define that macro (e.g. FreeBSD). As a side effect we get rid of some obsolete __GNU_LIBRARY__ macro usage. [kzak@redhat.com: - use #ifndef] Signed-off-by: Guillem Jover <guillem@hadrons.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: check for ERANGE errorsKarel Zak2009-10-061-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup --disable-{fallocate,pivot_root,unshare}Karel Zak2009-10-061-2/+2
| | | | | | | | * add --disable-fallocate * add --disable-pivot_root * cleanup --disable-unshare Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: new commandMikhail Gusarov2009-10-064-0/+183
| | | | | | | | | | | | 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>
* fallocate: new commandKarel Zak2009-09-224-0/+230
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* rtcwake: ignore the tm_isdst field returned from the RTCPaul Fox2009-09-071-1/+1
| | | | Signed-off-by: Paul Fox <pgf@laptop.org>
* rtcwake: add S5 supportKarel Zak2009-09-072-1/+27
| | | | | | | | | | | | | | | | | | | | | Based on patch from Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> at https://bugzilla.redhat.com/show_bug.cgi?id=449115 Piergiorgio's note about S5: > According to the ACPI specifications, chapter 4.7.2.4 "Real Time > Clock Alarm", the wakeup from RTC, when supported, should work from > *sleep* state S1-S3 and, optionally, from S4. > > Note 3 (same chapter) says that S5 is *not* a sleep state and should > not be supported. Actually it also says that: "The OS will disable > the RTC_EN bit prior to entering the G2/S5 or G3 states regardless." > > Nevertheless, on all PC supporting the RTC wakeup I tested, all were > able to wake from S5. Signed-off-by: Karel Zak <kzak@redhat.com>
* replace usleep() for systems that don't have themDaniel Mierswa2009-08-211-0/+1
| | | | | | | | | This function is marked obsolete in POSIX.1-2001 and removed in POSIX.1-2008. Conditionally replaced with nanosleep(). Signed-off-by: Daniel Mierswa <impulze@impulze.org>
* Revert "mount: clean up mount.8"Karel Zak2009-08-181-7/+0Star
| | | | | | | | | This reverts commit 98c7944b52c54c86fb5b9d73fbead9442bfa0e30. Unfortunately, the patch has been committed by "git commit -a" and includes unwanted changes in configure.ac and sys-utils/Makefile.am... Sorry.
* mount: clean up mount.8Karel Zak2009-08-171-0/+7
| | | | | | | | | * use "filesystem" everywhere (currently, the mount.8 man page is inconsistent and uses "file system" and "filesystem") * fix "The extN" to "The extN filesystem" (reported by Theodore Tso) Signed-off-by: Karel Zak <kzak@redhat.com>
* tunelp.8: formattingPeter Breitenlohner2009-08-171-16/+43
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* switch_root.8: formattingPeter Breitenlohner2009-08-171-3/+2Star
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* setsid.1: formattingPeter Breitenlohner2009-08-171-1/+3
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* setarch.8: formattingPeter Breitenlohner2009-08-171-4/+10
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* rtcwake.8: formattingPeter Breitenlohner2009-08-171-4/+12
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* renice.1: formattingPeter Breitenlohner2009-08-171-4/+4
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* readprofile.1: formattingPeter Breitenlohner2009-08-171-20/+18Star
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* rdev.8: formattingPeter Breitenlohner2009-08-171-11/+39
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* pivot_root.8: formattingPeter Breitenlohner2009-08-171-7/+6Star
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* lscpu.1: formattingPeter Breitenlohner2009-08-171-3/+6
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* ldattach.8: formattingPeter Breitenlohner2009-08-171-5/+7
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* ipcs.1: formattingPeter Breitenlohner2009-08-171-4/+12
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* ipcrm.1: formattingPeter Breitenlohner2009-08-171-8/+2Star
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* ipcmk.1: formattingPeter Breitenlohner2009-08-171-6/+18
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* dmesg.1: formattingPeter Breitenlohner2009-08-171-3/+9
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>