Commit Graph

2867 Commits

Author SHA1 Message Date
Davidlohr Bueso 2ab428f6a8 sys-utils: make use xalloc wrappers
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 16:43:23 +01:00
Marek Polacek 0c3e520240 ctrlaltdel: use err() instead of fprintf() and exit()
[kzak@redhat.com: - remove unnecessary program name from err(),
                  - use program_invocation_short_name]

Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-21 13:28:45 +02:00
Petr Uzel fe81c7d1b8 lscpu: really use 'mode' argument in path_fopen() 2010-10-07 10:24:57 +02:00
Jakob Unterwurzacher c348d9346a flock: use more useful example in flock.1
The example in the man page does not prevent concurrent execution, as it
obtains a shared lock. More useful is taking an exclusive lock, i.e.
remove "-s".
Additionally, IMO most people want the script to exit when the lock
cannot be acquired, so adding "-n".
2010-10-07 10:24:28 +02:00
Mike Frysinger fac8b4bd78 fallocate: fix build failure with old linux headers
If linux/falloc.h does not exist, the build system still enables the
fallocate util, but ultimately fails when it tries to include the
header and use a define from it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-07 09:49:01 +02:00
Davidlohr Bueso ad0ad79ae9 lscpu: update lscpu.1 to include new additions.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-09-17 10:00:41 +02:00
Karel Zak 5d4ba40ddc lscpu: support sysfs without cpu/online file
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-20 21:15:51 +02:00
Davidlohr Bueso 9b8d4d5f18 lscpu: add byte order and bogoMIPS information
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-20 13:20:09 +02:00
Karel Zak 1fc0b941d6 flock: properly report exec() errors
Reported-by: Barry Davis <barry_davis@stormagic.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-20 11:45:00 +02:00
Karel Zak 4f912c6ac5 lscpu: add -x and {On,Off}-line CPU(s) mask/list
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-11 15:41:48 +02:00
Karel Zak aac1e59ebb lscpu: support offline CPUs
# echo 0 >/sys/devices/system/cpu/cpu3/online
 # echo 0 >/sys/devices/system/cpu/cpu2/online

 # grep processor /proc/cpuinfo
 processor       : 0
 processor       : 1

 # lscpu
 lscpu: error: cannot open
 /sys/devices/system/cpu/cpu2/cache/index0/shared_cpu_map: No such file or directory

This patch also add a new "On-line CPU(s):" line to the lscpu(1)
output.

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623012
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-11 12:43:25 +02:00
Davidlohr Bueso 219da9223d dmesg: fix memory leak in dmesg(1).
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-08-04 11:46:38 +02:00
Diego Elio 'Flameeyes' Pettenò 111f32a97f build-sys: man aliases don't depend on original man page
Avoid rebuilding the man aliases over and over given that they do not
copy the content but only alias it.

Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
2010-07-29 17:48:44 +02:00
Diego Elio 'Flameeyes' Pettenò 533b9dce29 build-sys: use the silent-rules prefix when generating man pages.
This is backward-compatible with automake 1.10 as the AM_V_GEN macro
is going to be null anyway.

Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
2010-07-29 17:48:22 +02:00
François Revol 1bf4407a1d portability: use standard constants
Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-26 11:41:04 +02:00
Patrice Dumas 2c26d56ff5 flock: fix file number in flock.1 man page
According to a search on the internet, the 200 file number is not a
posix shell feature, since posix shells are only mandated to have 1
through 9.  I haven't verified that this claim is right, but, at least
dash doesn't like the 200. So here is a patch for the flock man page
that replaces 200 with 9.

Signed-off-by: Patrice Dumas <pertusus@free.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-07 10:09:40 +02:00
Francesco Cosoleto 2f8f138883 lscpu: replace LC_MESSAGES with LC_ALL in setlocate()
LC_CTYPE is necessary to print correctly some non English characters,
set LC_ALL for the sake of brevity.

Example:
    $ LANG=fr_FR lscpu -p | head -n 1
\# La suite est en format analysable, transmissible ? d'autres

instead of:
\# La suite est en format analysable, transmissible à d'autres

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-30 12:51:35 +02:00
Francesco Cosoleto 51e1424225 ipcrm: remove redundant message in case of invalid option
This leaves getopt() only to print a similar error message on invalid
options.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-30 12:51:35 +02:00
Francesco Cosoleto 4163ab187d ipcs: advise translators a different output format
Shared memory status output format need changes but there are backward
compatibility problems. This is a invite to apply in translations the
same style used for the rest of the summaries as well as for the limits
reported by -l option.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-30 12:51:35 +02:00
Francesco Cosoleto e0a6948b59 lscpu: fix typo in lscpu.1
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-30 12:51:35 +02:00
Francesco Cosoleto 4a939e047c lscpu: gettextize "CPU(s)"
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-30 12:51:35 +02:00
Benno Schulenberg d8b25f6254 lscpu: fix typo, "faild" to "failed"
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2010-06-15 12:55:17 +02:00
Benno Schulenberg e6b0611b46 messages: gettextize a few skipped or forgotten ones
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2010-06-14 11:19:19 +02:00
Benno Schulenberg d0bb6987a8 textual: fix typos, and rephrase some things for clarity
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2010-06-14 11:17:00 +02:00
Francesco Cosoleto 89074c1659 ipcs: reorganize help and usage texts
Help text old version:

	ipcs provides information on ipc facilities for which you have read access.
	Resource Specification:
		-m : shared_mem
		-q : messages
		-s : semaphores
		-a : all (default)
	Output Format:
		-t : time
		-p : pid
		-c : creator
		-l : limits
		-u : summary
	-i id [-s -q -m] : details on resource identified by id
	usage : ipcs -asmq -tclup
		ipcs [-s -m -q] -i id
		ipcs -h for help.

New version:
	Usage: ipcs [resource]... [output-format]
	       ipcs [resource] -i id

	Provide information on IPC facilities for which you have read access.

	    -h      display this help
	    -i id   print details on resource identified by id

	Resource options:
	    -m      shared memory segments
	    -q      message queues
	    -s      semaphores
	    -a      all (default)

	Output format:
	    -t      time
	    -p      pid
	    -c      creator
	    -l      limits
	    -u      summary

Usage text old version:
	usage : ipcs -asmq -tclup
		ipcs [-s -m -q] -i id
		ipcs -h for help.

New version:
	Usage: ipcs [-asmq] [-t|-c|-l|-u|-p]
	       ipcs [-s|-m|-q] -i id
	       ipcs -h for help

[kzak@redhat.com: - use program_invocation_short_name
                  - minor cleanups]

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:35:31 +02:00
Francesco Cosoleto 3c462efefe ipcs: add missing "PIDs" to related shared memory header text
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-01 11:18:02 +02:00
Francesco Cosoleto f29922a5bc ipcs: get rid of colons from header strings for consistency
This changes output of -u, -l, and -c.

Example of non consistent output:
    $ ipcs -u | grep ^---
------ Shared Memory Status --------
------ Semaphore Status --------
------ Messages: Status --------

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-01 11:17:56 +02:00
Karel Zak 7e03f38312 lscpu: use cpuset masks, read data for all CPUs
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:11:26 +02:00
Karel Zak d50363cd62 lscpu: improve --sysroot code
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:11:25 +02:00
Karel Zak e8aa16eedd lscpu: cleanup used names
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:10:49 +02:00
Karel Zak ef173bde3f lscpu: cleanup path_scanstr()
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:10:01 +02:00
Karel Zak 5dfc518c2e build-sys: replace ../ with $top_srcdir
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-24 12:37:12 +02:00
Karel Zak a3e40c1465 rdev: remove this deprecated command
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-18 16:14:44 +02:00
Karel Zak fd1ee3b92e fallocate: check for number of arguments
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-14 13:04:50 +02:00
Hajime Taira f0bef3ca0f fsfreeze: new command
[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>
2010-05-14 13:01:01 +02:00
Karel Zak 3f1be691da unshare: drop potential euid privileges before exec
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>
2010-05-06 09:59:16 +02:00
Marek Otahal bb8b11f1f3 rtcwake: add disable action to rtcwake man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-23 14:20:54 +02:00
Marek Otahal c15dd93b17 rtcwake : add disable action for rtc alarm
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-23 14:16:59 +02:00
Karel Zak 569f3ca278 rtcwake: add --dry-run option
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-08 09:20:21 +02:00
Karel Zak ecd55f9647 rtcwake: does miss the "off" option
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>
2010-04-08 08:51:00 +02:00
Karel Zak 3b6b039ae8 fallocate: support suffixes for --offset and --lenght
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-30 14:45:37 +02:00
Henne Vogelsang bc54770d9e lscpu: fix cpuid opcode detection
Fixes commit c9239f23ac. 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>
2010-03-01 11:35:54 +01:00
Karel Zak b5b28b435e ldattach: prints help to stdout
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-01 10:51:12 +01:00
Tilman Schmidt b091b880f9 ldattach: add --iflag command line option
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>
2010-03-01 10:45:47 +01:00
Karel Zak 7b549aff71 ldattach: create a generic functions for name=value tables
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-01 10:25:55 +01:00
Karel Zak 79e8b41a4a lscpu: add {32,64}-bit CPU modes detection
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>
2010-01-07 17:34:03 +01:00
Mike Frysinger 60cd48bd14 flock: fix hang when parent ignores SIGCHLD
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-12-07 15:23:40 +01:00
Karel Zak 63cb4b0616 switch_root: add note about subroots to switch_root.8
Based on patch from Daniel Drake <dsd@laptop.org>

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 15:18:51 +01:00
Karel Zak 558417e8c8 Revert "switch_root: add subroot support"
This reverts commit a692a87459.

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-11-20 15:11:59 +01:00
Ken Kopin d13fe35ca1 dmesg: fix typo in man page
Signed-off-by: LaMont Jones <lamont@debian.org>
2009-10-19 22:22:18 +02:00
Karel Zak becc79d5b6 ldattach: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:00:27 +02:00
Karel Zak 532c6cb199 switch_root: remove TIOCSCTTY and setsid()
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-09 15:17:54 +02:00
Guillem Jover feada32ffc ipcs: use __GLIBC__ instead of obsolete __GNU_LIBRARY__
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-09 15:17:53 +02:00
Guillem Jover 869829e457 build-sys: check for union semun instead of using _SEM_SEMUN_UNDEFINED
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-09 15:16:25 +02:00
Karel Zak 6264af59fd fallocate: check for ERANGE errors
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06 23:57:11 +02:00
Karel Zak 11125e7aa9 build-sys: cleanup --disable-{fallocate,pivot_root,unshare}
* add --disable-fallocate
 * add --disable-pivot_root
 * cleanup --disable-unshare

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06 12:45:50 +02:00
Mikhail Gusarov 4205f1fda1 unshare: new command
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-10-06 12:45:42 +02:00
Karel Zak d46a54994e fallocate: new command
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-22 15:26:18 +02:00
Paul Fox 1da17ec6c1 rtcwake: ignore the tm_isdst field returned from the RTC
Signed-off-by: Paul Fox <pgf@laptop.org>
2009-09-07 12:29:37 +02:00
Karel Zak 77f5744c98 rtcwake: add S5 support
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-09-07 12:04:26 +02:00
Daniel Mierswa 437fa54f05 replace usleep() for systems that don't have them
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-21 09:58:17 +02:00
Karel Zak 8fb94e0d97 Revert "mount: clean up mount.8"
This reverts commit 98c7944b52.

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-18 10:53:15 +02:00
Karel Zak 98c7944b52 mount: clean up mount.8
* 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-17 17:44:59 +02:00
Peter Breitenlohner 67925e349e tunelp.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Peter Breitenlohner 07de218c57 switch_root.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Peter Breitenlohner 5293ad1ae9 setsid.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:06 +02:00
Peter Breitenlohner 181ebbb360 setarch.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:06 +02:00
Peter Breitenlohner 1955cf6047 rtcwake.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:06 +02:00
Peter Breitenlohner 267ab0bf08 renice.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:06 +02:00
Peter Breitenlohner fd22da56a6 readprofile.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:06 +02:00
Peter Breitenlohner 887b4d2c43 rdev.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:06 +02:00
Peter Breitenlohner 489625121b pivot_root.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:06 +02:00
Peter Breitenlohner e7a5546c6c lscpu.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:05 +02:00
Peter Breitenlohner 0b1b24999e ldattach.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:05 +02:00
Peter Breitenlohner 71d8702954 ipcs.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:05 +02:00
Peter Breitenlohner 0063ce9c5a ipcrm.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:05 +02:00
Peter Breitenlohner 1c5115a945 ipcmk.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:05 +02:00
Peter Breitenlohner 74fda19ea3 dmesg.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:05 +02:00
Peter Breitenlohner 8cd1bc97b4 ctrlaltdel.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:04 +02:00
Peter Breitenlohner be71078bd5 cytune.8: missing description of `-S', formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:04 +02:00
Karel Zak e6c379eb8d dmesg: add -r to help output
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-08-17 11:37:27 +02:00
Daniel Drake a692a87459 switch_root: add subroot support
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-14 14:41:33 +02:00
Karel Zak 30688dde55 build-sys: rename to _execdir
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-07-04 01:23:41 +02:00
Tilman Schmidt d5f36dec92 ldattach: add N_PPS support
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-29 22:31:15 +02:00
Peter Jones 2a7ccc65e9 switch_root: do recursiveRemove after our root is moved to avoid races.
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>
2009-06-22 21:45:25 +02:00
Peter Jones 4c2d96e62a switch_root: fork before cleaning up the filesystem.
Fork before cleaning up the old filesystem, so it becomes asyncronous,
which results in a faster boot time.

Signed-off-by: Peter Jones <pjones@redhat.com>
2009-06-22 21:45:25 +02:00
Peter Jones 82476a9080 switch_root: use file descriptor instead of path for recursiveRemove()
This makes recursiveRemove() use fdopendir() instead of taking a path,
so we're always sure about which namespace we're starting from.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:38:12 +02:00
Karel Zak b39bd02572 switch_root: add man page
Acked-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:30:47 +02:00
Karel Zak 8f24e52ed7 switch_root: use snprintf() rather tan str{cpy,cat}()
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:30:47 +02:00
Karel Zak 8b6457d06a switch_root: clean up argv[] usage, add -h and -V
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:30:47 +02:00
Karel Zak fcb495b1df switch_root: use err.h, clean up return codes
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:30:47 +02:00
Karel Zak a6fc8b07f9 switch_root: rewrite to use fstatat() and unlinkat()
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:30:47 +02:00
Karel Zak 3ddbe4d26b switch_root: fix coding style
Signed-off-by: Peter Jones <pjones@redhat.com>
Acked-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:30:47 +02:00
Karel Zak bd6713471f build-sys: add --disable-switch_root
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-22 21:30:46 +02:00
Karel Zak 711ea7307d switch_root: new command
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>
2009-06-22 21:30:46 +02:00
Mike Frysinger c9239f23ac lscpu: fix cpuid code on x86/PIC
If we build lscpu as PIE, we currently get a build failure:
lscpu.c: In function 'main':
lscpu.c:333: error: can't find a register in class 'BREG' while reloading 'asm'
lscpu.c:333: error: 'asm' operand has impossible constraints
make[2]: *** [lscpu.o] Error 1

So we need a little bit of register shuffling to keep gcc happy.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-11 10:52:02 +02:00
Karel Zak db1749cf6c flock: add NLS support, remove tailing white-spaces
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-11 13:37:45 +01:00
Karel Zak 56d23414c1 flock: fix printf format error in usage()
flock.c: In function ‘usage’:
flock.c:75: warning: too few arguments for format

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-11 13:37:45 +01:00
Karel Zak 841f86dbc2 flockc: segfaults when file name is not given
$ flock -s
Segmentation fault

ltrace:
__libc_start_main(0x8048870, 2, 0xbfe9f404, 0x8049070, 0x8049060 <unfinished ...>
getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = 115
getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = -1
strtol(0, 0xbfe9f34c, 10, 0x80494e0, 0xbfe9f354 <unfinished ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

Addresses-Red-Had-Bugzilla: #489672
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-11 13:37:40 +01:00
Karel Zak 7cfbafda9c renice: add -n option for compatibility with POSIX
The -n option is required by POSIX.1-200x.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-09 21:09:50 +01:00
Karel Zak a0d4e9d91b rtcwake: add mising .RE to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-29 17:47:20 +01:00
Karel Zak 8e88e8fc1e rtcwake: explain supported modes in rtcwake.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-26 22:00:22 +01:00
Marco d'Itri e4b0fc36ff rtcwake: support not suspending
People usually want to use pm-utils to suspend the system instead of
the raw kernel interface, so I added an option to just exit after
configuring the wakeup time.
Actually I think that all the suspend code should be removed from
rtcwake, since it does not really belong there.

Signed-off-by: Marco d'Itri <md@linux.it>
2009-01-26 21:22:24 +01:00
Adam Jackson 11ea22d5a3 dmesg: Add -r (raw) option.
Useful for debugging which kernel messages are ruining your quiet
bootup.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-01-16 12:34:49 +01:00
Alexey Gladkov ff5717391c flock: Allow lock directory
With this patch, you can lock directory. Additionally,
lockfile opens with O_NOCTTY.

Try to open file with O_CREAT flag first, and without it
if open fails with EISDIR.  Suggested by H. Peter Anvin.

Signed-off-by: Alexey Gladkov <legion@altlinux.org>
2008-12-03 10:33:53 +01:00
Karel Zak 16cccfc19b rdev: cleanup includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-26 14:40:03 +01:00
Karel Zak 1dabcd2498 pivot_root: clean up
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-19 12:40:06 +01:00
Karel Zak 5947572d5e build-sys: move pivot_root(8) to sys-utils
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>
2008-11-19 12:38:43 +01:00
Matthias Koenig cf474aacfc lscpu: return EXIT_SUCCESS at the end
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
2008-10-22 23:35:19 +02:00
Karel Zak c8b64f6d77 lscpu: add Hypervisor detection
This patch adds two new fields:

 * "Hypervisor vendor"  -- based on CPUID and hypervisor specific
   PCI devices. lscpu(1) supports KVM, XEN, Microsoft HV now.

 * "Virtualization type"
	- "none"	= Xen dom0
	- "full"	= full virtualization (KVM, Xen, ...)
	- "para"	= Xen paravirtualization

Co-Author: Ky Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 13:56:52 +02:00
Karel Zak bf7b8d773b ipcs: fix exit codes, remove tailing white-spaces
Addresses-Red-Hat-Bugzilla: #465911
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-07 10:23:23 +02:00
Pedro Ribeiro 39a5a2314b readprofile: several strings without gettext calls
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 09:27:33 +02:00
Karel Zak f635c336c4 ipcmk: add NLS support
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-09-10 16:03:43 +02:00
Karel Zak cc41c0a33e ipcmk: fix error codes and error messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-09-10 16:00:17 +02:00
Hayden James 1b3f133043 ipcmk: new command
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>
2008-09-10 15:36:50 +02:00
Benno Schulenberg 455824187a ipcs: adjust some field positions and widths for correct alignment
[kzak@redhat.com:
	- note that "ipcs -m -t" did not work correctly on
          terminal with 80 columns
	- the change of output alignment should be mentioned
          in the Release Notes]

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2008-08-20 22:37:10 +02:00
Benno Schulenberg 11658135af ipcs: ungettextize the spacing of the table headers
It makes no sense to allow translators to adjust the spacing when
they cannot adjust the spacing of the actual data too.  Adjusting
such spacing is not really a translator's task.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2008-08-20 15:16:02 +02:00
Cai Qian 47b6e8b684 lscpu: --sysroot option and stable cache output
This patch added a --sysroot command-line option for testing purpose. It
also sorted cache names, and displayed cache information in a sorted
manner instead of randomly before. In addition, it had some other minor
fixes.

Signed-off-by: Cai Qian <qcai@redhat.com>
2008-08-14 12:22:29 +02:00
Karel Zak f8d87ab139 rtcwake: cleanup return codes
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-08-06 12:36:10 +02:00
Gabriel Burt fc18118430 rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET
rtcwake: Prefer RTC_WKALM_SET over RTC_ALM_SET, fixing bug with not
waking up with new RTCs.  Also, return error if unable to set the alarm.

Signed-off-by: Gabriel Burt <gburt@novell.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-08-06 12:19:46 +02:00
Alexey Gladkov 8e678e2124 Fix dmesg.1 installation
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
2008-08-05 12:25:59 +02:00
maximilian attems d144727bc3 use getpagesize()
getpagesize() is said to be more portable than sysconf(_SC_PAGESIZE)
to anything Linux.

this patch helps klibc porting effort as the sysconf
multiplex API is not supported there.

also remove comment of the switch to sysconf in mkswap.c.

Signed-off-by: maximilian attems <max@stro.at>
2008-07-30 13:26:58 +02:00
maximilian attems d3e8f6598b remove CVS keywords
this patch removes old CVS keywords from comments.

mount(8) works for newer Linux then 0.99 ;)

Signed-off-by: maximilian attems <max@stro.at>
2008-07-28 11:10:08 +02:00
maximilian attems 5423ccb1a1 dmesg: nuke old glibc 5 support
dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘klogctl’
dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘type’
dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘b’
dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘len’

without belows compat section dmesg just compiles fine against klibc.
as bonus reorder the includes.

Signed-off-by: maximilian attems <max@stro.at>
2008-07-28 11:06:50 +02:00
Samuel Thibault abd0b5686d ldattach: don't compile for non-linux systems
There is just ldattach which doesn't compile because line disciplines are not
implemented that way on the Hurd.  Is TIOCSETD any kind of standard?  Else I
guess the patch below would be fine.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-07-28 11:05:48 +02:00
Karel Zak a485aec8ce build-sys: cleanup sys-utils/Makefile.am
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-07-22 15:08:42 +02:00
Cai Qian 5dd7507c18 lscpu: new command
Add a lscpu(1) utility program.

[kzak@redhat.com:
	- indent by linux-2.6/scripts/Lindent
	- add lscpu.{c,1} to sys-utils/Makefile.am
	- add NLS suport
	- complete code refactoring
]

Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Cai Qian <qcai@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-07-18 03:01:49 +02:00
Paulius Zaleckas 47bf8ef7f1 rtcwake: fix the default mode to "standby"
Writing "suspend" to /sys/power/state does nothing.
Even "man rtcwake" says that default should be "standby" :)

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-06-09 12:49:00 +02:00
Karel Zak 2d281745d9 setarch: add fallback for linux/personality
setarch.c:248: error: 'ADDR_NO_RANDOMIZE' undeclared (first use in this function)
setarch.c:248: error: (Each undeclared identifier is reported only once
setarch.c:248: error: for each function it appears in.)
setarch.c:251: error: 'FDPIC_FUNCPTRS' undeclared (first use in this function)
setarch.c:257: error: 'ADDR_COMPAT_LAYOUT' undeclared (first use in this function)
setarch.c:260: error: 'READ_IMPLIES_EXEC' undeclared (first use in this function)

Linux gzp1 2.4.36.1-gzp1 #1 SMP Tue Feb 19 10:23:48 CET 2008 i686 GNU/Linux

Reported-By: Gabor Z. Papp <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-05-13 14:00:39 +02:00
Dmitry V. Levin 3c52010c68 setarch: provide backwards compatibility
The getopt_long(3) use introduced by commit
8df90dec2b
broke backwards compatibility.

Old behavior:
$ i386 uname -m
i686

New behavior:
$ i386 uname -m
i386: invalid option -- m
Linux

Traditional method to fix it is to disable program arguments reordering
by prefixing getopt_long's optstring with '+' character.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-16 11:20:09 +02:00
Karel Zak 00077d4d53 build-sys: update .gitignore files
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-14 14:24:03 +02:00
James Youngman c4e1583799 build-sys: ignore a bunch of generated files, mostly binaries
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-14 14:08:00 +02:00
Karel Zak f8132752db ldattach: use glibc termios
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-09 11:48:24 +02:00
Karel Zak fcba457783 ldattach: add NLS support
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-03-25 22:59:47 +01:00
Tilman Schmidt 1e8d11c459 ldattach: new command
Add an ldattach(8) utility program similar to the one in OpenBSD.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
2008-03-10 14:20:26 +01:00
Mike Frysinger d3cf541492 rtcwake: fix typo SATE -> STATE
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-02-15 02:01:00 +01:00
Mike Frysinger c41e134067 rtcwake: include libgen.h for basename prototype
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-02-15 01:36:19 +01:00
David Brownell 1b7c164c49 rtcwake: fix UTC time usage
Timezone handling is broken in this version since it's always
passing UTC time into the kernel, even on systems where the
RTC uses the local timezone.

I think that bug must come from bugs in how the system used to
to originally develop this code handled the RTC timezone.  Both
RTCs should have been kept in UTC ... but only one of them was.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2008-02-08 01:33:39 +01:00
Karel Zak 6dd6d8687b ipcs: add information about POSIX compatibility to ipcs.1
Addresses-Suse-Bug: #274338
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-02-08 00:51:04 +01:00
LaMont Jones 628cab7cde renice: detect errors in arguments, add -v, -h and long options
* renice was using atoi(), which does no error detection, meaning
   that: "renice +20 blah" was accepted as valid.

 * add -h | --help

 * add -v | --version

 * add long options for -p, -u and -g

 * cleanup coding style

Addresses-Debian-Bug: #385245
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: LaMont Jones <lamont@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-01-29 15:31:47 +01:00
Frédéric Bothamy 2dd88c0682 sys-utils: correct setarch.8 manpage link creation
At least on Debian, .so commands are relative to the man directory
(e.g., /usr/share/man), not to the subdirectory:
    % man i386
    man: can't open /usr/share/man/setarch.8: No such file or directory
    No manual entry for i386

See also http://bugs.debian.org/453245

Addresses-Debian-Bug: #453245
Signed-off-by: Frédéric Bothamy <frederic.bothamy@free.fr>
Signed-off-by: LaMont Jones <lamont@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-01-14 10:31:45 +01:00
Stepan Kasal 280ff4980c build-sys: simplify code around RDEV_LINKS and SETARCH_LINKS
Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-12-17 10:09:13 +01:00
Stepan Kasal d829a8df7e build-sys: use portable $(VAR:=) instead of gmake-specific $(addsuffix)
Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-12-17 10:09:03 +01:00
Stepan Kasal a3ca3a44c5 build-sys: use dist_man_MANS instead of man_MANS
Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-12-17 10:08:49 +01:00
Oliver Falk adf88e666a setarch: add missing alpha subarchs
Signed-off-by: Oliver Falk <oliver@linux-kernel.at>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-12-03 13:34:42 +01:00
David Brownell 2148b05182 rtcwake: misc cleanups
Cleanups for rtcwake:

  - Minor doc updates:  highlight the framebuffer problem,
    give correct history of this code
  - Improve debug output
  - Fix some linelength bugs

Note that this code predated the sysfs "wakealarm" mechanism, and
works around several now-fixed bugs in the kernel RTC framework.

Nowadays it would make sense to make this program use only the sysfs
interface to the RTC, using "since_epoch" instead of RTC_RD_TIME and
"wakealarm" instead of the four other ioctls.  That could simplify
the mess involved in timezone handling.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-12-03 13:29:47 +01:00
Samuel Thibault 3bbc932079 build-sys: non-linux support
Here is a patch that disables linux-specific tools on non-linux targets.

Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-Off-By: Karel Zak <kzak@redhat.com>
2007-11-08 02:26:36 +01:00
Benno Schulenberg 2e2d3ff6a3 setarch: tweak the help text, and gettextize a forgotten message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2007-11-06 01:09:04 +01:00
Benno Schulenberg 6557c51226 docs: tweak a few messages for clarity
Add a missing period, a missing space, a comma and a word for clarity,
plus a period and an uppercase letter to match surrounding messages.
Further add a missing call to gettext, and undo an unneeded linewrap.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2007-10-26 01:02:44 +02:00
Karel Zak 389afa3f9b setarch: generate groff links in a better way
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-18 14:59:23 +02:00
Karel Zak dd12a5b9cb rtcwake: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-11 14:27:08 +02:00
Karel Zak a6d35e6d68 rtcwake: fix verbose message
Just make NLS transtalors more happy. (rh#292081)

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-04 14:14:58 +02:00
LaMont Jones 0901c3a467 setarch: fix compiler warning
NULL is not 0L.  It's (void*)0.  Passing that as a parameter to a function
that takes an unsigned long results in a warning about the lack of a cast.

Signed-off-by: LaMont Jones <lamont@debian.org>
2007-09-23 21:34:33 +02:00
Karel Zak bf928360f2 build-sys: remove hardcoded _GNU_SOURCE
We have AC_GNU_SOURCE, so we needn't any extra hardcoded _GNU_SOURCE.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-09-20 00:57:01 +02:00
Karel Zak 8df90dec2b setarch: add long options to setarch and update manpage
Co-Author: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-09-05 17:12:18 +02:00
Arkadiusz Miskiewicz 63038035f3 setarch: adding groff symlinks to setarch manual page
Signed-off-by: Arkadiusz Miskiewicz <arekm@maven.pl>
2007-09-03 11:33:11 +02:00
A. Costa 16e1cdf4ab flock: typo in man page
Signed-off-by: LaMont Jones <lamont@debian.org>
2007-09-02 13:05:46 +02:00
Justin B Rye c448ad8686 cytune: make the oneliner more specific the cyclades hw in question
See http://bugs.debian.org/375150

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
2007-08-27 23:50:01 +02:00
Karel Zak 1e322675f9 setarch: add --3gb option fot compatibility with Debian linux{32,64} command
Debian had a pre-existing linux{32,64} command which supported only
--3gb and --4gb. Adding support for those options allows setarch to
replace that package.

(Note that long options are expected for all setarch flags in the next
release.)

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-27 23:34:08 +02:00
Karel Zak eeadb4f4cb setarch: finish adding parisc support
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-27 23:16:28 +02:00
LaMont Jones 782e198d93 setarch: add parisc/parisc64 support
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
2007-08-27 10:47:05 +02:00
Karel Zak 8855c38d04 setarch: cleanup licensing note
Signed-off-by: Jindrich Novy <jnovy@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-21 10:52:02 +02:00
Balint Cristian 9e19737a08 setarch: add __alpha__ support
Signed-off-by: Balint Cristian <cbalint@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-21 10:00:58 +02:00
Dennis Gilmore ee7401c58e setarch: add sparc32bash alias to keep compatibility with sparc32
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-21 09:55:28 +02:00
LaMont Jones aa450e4023 rdev: should be delivered on amd64 as well as i386.
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-25 19:08:36 +02:00
Matthias Koenig 5a3009cad6 readprofile: fix on ppc64
Fix inconsistency between kernel profiling and readprofile.
The range of kernel profiling is between _stext and _etext,
and readprofile tries to extract profiling for all the symbols in
/boot/System.map-2.6.16.11-7-ppc64 from /proc/profile, but there
are more symbols in /boot/System.map-2.6.16.11-7-ppc64 than those
between _stext and _etext.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-24 14:28:40 +02:00
Karel Zak cf0a5736c8 cytune: remove linux/tty.h inclusion
The <linux/tty.h> file is empty. It's __KERNEL__ only.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-19 00:38:00 +02:00
Bernhard Walle 7670038954 misc-util: new rtcwake command
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-16 13:50:33 +02:00
Karel Zak 6a97809b9f sys-utils: add arch(1) back to the official tree
This patch add arch(1) back to util-linux source code tree, but the
command is not installed by defautl.

For more details see "./configure --help".

The arch command is deprecated in favor of "uname -m" (coreutils). The
latest (6.9+) version of coreutils also supports arch(1) as an alias
to "uname -a". Please, if you need arch(1) use the coreutils
implementation.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-11 12:37:40 +02:00
Mike Frysinger db94975b59 also search for __stext in readprofile
Some architectures have a single underscore prefix in their ABI, so there will
be no "_stext" symbol, just "__stext".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2007-07-10 14:12:44 +02:00
Karel Zak a5b47e0a39 setarch: add NLS support
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:36:03 +02:00
Karel Zak 86d62711a9 man pages: add "AVAILABILITY" section
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:17:04 +02:00
Karel Zak 8b3a46d2b0 sys-utils: added setarch command
This patch merges setarch command to util-linux-ng code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 13:48:15 +02:00
Karel Zak e782f1d400 build-sys: cleanup architecture conditionals
This patch also add some new architectures for
AM_CONDITIONAL(ARCH_  ...)

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 13:21:06 +02:00
Karel Zak 2dfd8e6276 build-sys: cleanup sys-utils/ rdev symlinks
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-29 15:12:33 +02:00
Karel Zak 65093299dc sys-utils: add note about obsolete ramsize option to rdev.8
The 2.0.x kernels and newer dynamically allocate the ramdisk
and do not need this setting.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-05 10:40:26 +02:00
Karel Zak 2ccebfe86e sys-utils: fix man page headers
The man pages have been moved from man8 to man1, but the
headers still refer to man1.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-16 13:55:02 +02:00
Karel Zak 2a4b572500 sys-utils: move some man pages from category 8 to 1
The dmesg, ipcrm, ipcs, renice and setsid are user-accessible commands
and belong in man1 more than to man8.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 23:50:52 +02:00
Karel Zak 7ac3b5b8e3 Clean up pagesize/PAGE_SIZE usage.
Now all code in util-linux uses sysconf(_SC_PAGESIZE) that is standardized and
preferred way of querying page size. The asm/page.h file is not included to the
code anymore. (This patch doesn't change mount's FS detection code which will
be removed later).

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-06 11:35:15 +01:00
Karel Zak cdd540c19f ipcs: max total shared memory in kbytes instead pages
The ipcs command has reported "max total shared memory" as a number of pages.
The others IPC limits are reported in (k)bytes, so it doesn't make sense mix
pages and bytes in the same output. Now "max total shared memory" is reported in
kbytes.

[Migration note: type="API change", severity="low"]

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:46:25 +01:00
Karel Zak 4ac0f9d0c2 ipcs: fix typo in Semaphore headers
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:45:48 +01:00
Karel Zak 562218e6ea build-sys: add missing files
This patch add all missing headers, man pages and README files to automake
stuff and "make dist-gzip" produces useful tarball now.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 11:57:07 +01:00
Karel Zak 8eeb575c0d build-sys: remove generated autotools stuff from git
The generated autotools stuff shouldn't be maintained by SCM. After check out
from git use ./autogen.sh. For more details see README.devel.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-03 22:20:44 +01:00
Karel Zak a120aaa70d Imported from util-linux-2.13-pre7 tarball. 2006-12-07 00:27:22 +01:00
Karel Zak cf6d7faebb Imported from util-linux-2.13-pre6 tarball. 2006-12-07 00:27:13 +01:00
Karel Zak ca3ea756e7 Imported from util-linux-2.13-pre4 tarball. 2006-12-07 00:27:06 +01:00
Karel Zak 9cb689775c Imported from util-linux-2.13-pre3 tarball. 2006-12-07 00:27:03 +01:00
Karel Zak baf39af15b Imported from util-linux-2.13-pre2 tarball. 2006-12-07 00:26:58 +01:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
Karel Zak bf3baa9907 Imported from util-linux-2.12p tarball. 2006-12-07 00:26:33 +01:00
Karel Zak 756bfd018e Imported from util-linux-2.12o tarball. 2006-12-07 00:26:31 +01:00
Karel Zak 5213517f54 Imported from util-linux-2.12l tarball. 2006-12-07 00:26:28 +01:00
Karel Zak b22550fa15 Imported from util-linux-2.12k tarball. 2006-12-07 00:26:26 +01:00
Karel Zak d162fcb550 Imported from util-linux-2.12j tarball. 2006-12-07 00:26:24 +01:00
Karel Zak 0b0bb92085 Imported from util-linux-2.12i tarball. 2006-12-07 00:26:22 +01:00
Karel Zak c129767e06 Imported from util-linux-2.12b tarball. 2006-12-07 00:26:16 +01:00
Karel Zak d03dd60840 Imported from util-linux-2.12a tarball. 2006-12-07 00:26:14 +01:00
Karel Zak df1dddf9ff Imported from util-linux-2.12 tarball. 2006-12-07 00:26:12 +01:00
Karel Zak a5a16c6853 Imported from util-linux-2.11y tarball. 2006-12-07 00:26:08 +01:00
Karel Zak f0c8eda12c Imported from util-linux-2.11u tarball. 2006-12-07 00:26:00 +01:00
Karel Zak 63cccae468 Imported from util-linux-2.11t tarball. 2006-12-07 00:25:58 +01:00
Karel Zak a2c5f3cadc Imported from util-linux-2.11r tarball. 2006-12-07 00:25:56 +01:00
Karel Zak 1d4ad1decc Imported from util-linux-2.11q tarball. 2006-12-07 00:25:54 +01:00
Karel Zak ffc4374869 Imported from util-linux-2.11o tarball. 2006-12-07 00:25:53 +01:00
Karel Zak 612721dba8 Imported from util-linux-2.11n tarball. 2006-12-07 00:25:52 +01:00
Karel Zak e8f2641919 Imported from util-linux-2.11m tarball. 2006-12-07 00:25:49 +01:00
Karel Zak 364cda4857 Imported from util-linux-2.11f tarball. 2006-12-07 00:25:48 +01:00
Karel Zak c07ebfa1e0 Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
Karel Zak 66ee8158b6 Imported from util-linux-2.10s tarball. 2006-12-07 00:25:44 +01:00
Karel Zak 22853e4a82 Imported from util-linux-2.10m tarball. 2006-12-07 00:25:43 +01:00
Karel Zak eb63b9b8f4 Imported from util-linux-2.10f tarball. 2006-12-07 00:25:41 +01:00
Karel Zak 7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
Karel Zak 5c36a0eb7c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
Karel Zak 2b6fc908bc Imported from util-linux-2.8 tarball. 2006-12-07 00:25:35 +01:00
Karel Zak fd6b7a7ffc Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00
Karel Zak 726f69e29c Imported from util-linux-2.5 tarball. 2006-12-07 00:25:33 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00