summaryrefslogtreecommitdiff
path: root/sys-utils
AgeCommit message (Collapse)AuthorFilesLines
2010-01-18Merge commit 'v2.17'LaMont Jones1-0/+35
2010-01-07lscpu: add {32,64}-bit CPU modes detectionKarel Zak1-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>
2009-12-21Merge remote branch 'origin/master'LaMont Jones1-1/+9
2009-12-07flock: fix hang when parent ignores SIGCHLDMike Frysinger1-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>
2009-11-27Merge remote branch 'origin/master'LaMont Jones2-76/+18
2009-11-20switch_root: add note about subroots to switch_root.8Karel Zak1-0/+13
Based on patch from Daniel Drake <dsd@laptop.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20Revert "switch_root: add subroot support"Karel Zak1-76/+5
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
2009-10-19dmesg: fix typo in man pageKen Kopin1-1/+1
Signed-off-by: LaMont Jones <lamont@debian.org>
2009-10-19Fix typo in dmesg manpage.Ken Kopin1-1/+1
Signed-off-by: LaMont Jones <lamont@debian.org>
2009-10-19Merge remote branch 'origin/master'LaMont Jones1-4/+1
Conflicts: mount/lomount.c
2009-10-16ldattach: use c.hKarel Zak1-4/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-10Merge remote branch 'origin/master'LaMont Jones8-18/+194
2009-10-09switch_root: remove TIOCSCTTY and setsid()Karel Zak1-7/+0
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>
2009-10-09ipcs: use __GLIBC__ instead of obsolete __GNU_LIBRARY__Guillem Jover1-3/+1
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>
2009-10-09build-sys: check for union semun instead of using _SEM_SEMUN_UNDEFINEDGuillem Jover2-6/+2
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>
2009-10-06fallocate: check for ERANGE errorsKarel Zak1-0/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06build-sys: cleanup --disable-{fallocate,pivot_root,unshare}Karel Zak1-2/+2
* add --disable-fallocate * add --disable-pivot_root * cleanup --disable-unshare Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06unshare: new commandMikhail Gusarov4-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>
2009-09-26Merge commit 'origin/master'LaMont Jones4-0/+230
2009-09-22fallocate: new commandKarel Zak4-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>
2009-09-16Merge commit 'origin/master'LaMont Jones2-2/+28
2009-09-07rtcwake: ignore the tm_isdst field returned from the RTCPaul Fox1-1/+1
Signed-off-by: Paul Fox <pgf@laptop.org>
2009-09-07rtcwake: add S5 supportKarel Zak2-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>
2009-08-23Merge commit 'origin/master'LaMont Jones19-129/+238
Conflicts: getopt/getopt.1
2009-08-21replace usleep() for systems that don't have themDaniel Mierswa1-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>
2009-08-18Revert "mount: clean up mount.8"Karel Zak1-7/+0
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.
2009-08-17mount: clean up mount.8Karel Zak1-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>
2009-08-17tunelp.8: formattingPeter Breitenlohner1-16/+43
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17switch_root.8: formattingPeter Breitenlohner1-3/+2
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17setsid.1: formattingPeter Breitenlohner1-1/+3
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17setarch.8: formattingPeter Breitenlohner1-4/+10
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17rtcwake.8: formattingPeter Breitenlohner1-4/+12
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17renice.1: formattingPeter Breitenlohner1-4/+4
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17readprofile.1: formattingPeter Breitenlohner1-20/+18
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17rdev.8: formattingPeter Breitenlohner1-11/+39
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17pivot_root.8: formattingPeter Breitenlohner1-7/+6
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17lscpu.1: formattingPeter Breitenlohner1-3/+6
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17ldattach.8: formattingPeter Breitenlohner1-5/+7
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17ipcs.1: formattingPeter Breitenlohner1-4/+12
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17ipcrm.1: formattingPeter Breitenlohner1-8/+2
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17ipcmk.1: formattingPeter Breitenlohner1-6/+18
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17dmesg.1: formattingPeter Breitenlohner1-3/+9
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17ctrlaltdel.8: formattingPeter Breitenlohner1-4/+4
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17cytune.8: missing description of `-S', formattingPeter Breitenlohner1-24/+40
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17dmesg: add -r to help outputKarel Zak1-2/+2
On Tue, Aug 04, 2009 at 05:52:38PM +0200, Dalibor Straka wrote: > while I was reading the source, I've noticed missing option in the > help message for "-r". So I'm sending one-line patch for dmesg. Reported-by: Dalibor Straka <dast@panelnet.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-07-21Merge commit 'origin/master'LaMont Jones6-11/+354
Conflicts: AUTHORS NEWS config/include-Makefile.am configure.ac mount/lomount.c po/POTFILES.in po/ca.po po/cs.po po/da.po po/de.po po/es.po po/et.po po/eu.po po/fi.po po/fr.po po/hu.po po/id.po po/it.po po/ja.po po/nl.po po/pl.po po/pt_BR.po po/ru.po po/sl.po po/sv.po po/tr.po po/uk.po po/util-linux-ng.pot po/vi.po po/zh_CN.po
2009-07-14switch_root: add subroot supportDaniel Drake1-5/+76
The current switch_root can only switch to a new root that is the root of a mount point. This patch adds support for "subroots", where the new root is somewhere below a mount point. It does this by adding in a few extra steps to chroot into the subroot after the enclosing partition has been moved and entered. This will be used by OLPC, who sort-of have 2 copies of Fedora stored on a single partition under different directory trees, where the initramfs decides which one to boot into [kzak@redhat.com: - port to the current u-l-ng switch_root code - don't use static buffer for "dir" in get_parent_mount()] CC: Peter Jones <pjones@redhat.com> Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-07-04build-sys: rename to _execdirKarel Zak1-9/+9
The variable name "usrlibexecdir" is very confusing (because we have /usr/libexec). The "exec" prefix is required for user-defined directories, see http://www.gnu.org/software/hello/manual/automake/The-Two-Parts-of-Install.html#The-Two-Parts-of-Install This patch renames all usr*execdir variables to usr*_execdir. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-29ldattach: add N_PPS supportTilman Schmidt2-2/+10
Add support for a line discipline name "PPS" selecting the Pulse Per Second line discipline N_PPS (18). The number has been reserved since kernel release 2.6.28, and the implementation is finally going to be submitted for kernel release 2.6.31. Signed-off-by: Tilman Schmidt <tilman@imap.cc>
2009-06-22switch_root: do recursiveRemove after our root is moved to avoid races.Peter Jones1-9/+10
This way there's no race between unlinking the /newroot directory and the MS_MOVE/chroot() to get away from it. Signed-off-by: Peter Jones <pjones@redhat.com>