summaryrefslogtreecommitdiff
path: root/sys-utils
AgeCommit message (Collapse)AuthorFilesLines
2012-01-22Restored building setsidIgor Pashev1-5/+4
2012-01-22Restored building renice (with gnulib)Igor Pashev2-4/+6
2012-01-22For non-linux build inly flock (ipc* for Illumos have zone support)Igor Pashev3-5/+11
2011-01-31Merge remote branch 'origin/master'LaMont Jones6-29/+42
Conflicts: mount/mount.8 mount/mount.c
2011-01-23remaining util-linux-ng to util-linuxSami Kerola1-2/+2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-01-19lscpu: fix 64bit CPU detectionKarel Zak1-20/+33
Note that the code is still not able to detect 64bit on sparcs and ppc. Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-17build-sys: use WORDS_BIGENDIAN to determine platform byte-orderFabian Groffen1-3/+1
Autoconf contains the right magic to determine the endianness on many platforms next to Linux. This reverses previous commits to move away from WORDS_BIGENDIAN: "use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN" This is necessary to compile on non Linux platforms like Darwin and Solaris. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-17sys-utils: fix manpage typosDavidlohr Bueso3-3/+3
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-01-05unshare: fix SIGSEGV on invalid command line optionAlexey Gladkov1-0/+1
$ unshare --hel Segmentation fault The last element of longopts has to be filled with zeros. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-31lscpu: avoid len = 0 as a consequence of maxcpus = 0Gerrit Renker1-1/+2
This problem was observed on an x86_64 Mobile AMD Sempron 3700+ where kernel_max returned "0" as the index of the highest CPU. As a consequence, several variables in lscpu, which relied on maxcpus >= 1 (in particular the 'len' value) were set to 0, resulting in the following errors: host>./lscpu lscpu: failed to read: /sys/devices/system/cpu/online: No such file or directory host> cat /sys/devices/system/cpu/kernel_max 0 The fix used by this patch is to interpret kernel_max as an index and maxcpus as a count >= 1, tested to work. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-29Merge remote branch 'origin/master'LaMont Jones34-2633/+494
Conflicts: login-utils/Makefile.am mount/lomount.c text-utils/od.1
2010-12-10fix __noreturn__ usageKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-09renice: improve messages specifying what ID is referring toFrancesco Cosoleto1-5/+11
Hello, On 30/11/2010 13:01, Karel Zak wrote: > Unfortunately, translators don't like this kind of strings where any > translatable substring is inserted to the normal sentence. It would be > better to use something like: > > "%d (%s): failed to set priority", who, idtype > > "%s: %d: failed to set priority", idtype, who > > or so... or "failed to set priority for %d (%s)"? From 536eb11f873f2c887e075a37ffb3c971cac258d5 Mon Sep 17 00:00:00 2001 From: Francesco Cosoleto <cosoleto@gmail.com> Date: Mon, 6 Dec 2010 01:23:10 +0100 Subject: [PATCH] renice: improve messages specifying what ID is referring to This version makes more clear the printed message specially when the --user option is used. Old version: $ renice 19 10 -u fra -g 1 renice: 10: setpriority: Operation not permitted renice: 1000: setpriority: Operation not permitted renice: 1: setpriority: Operation not permitted $ renice 19 -u fra 1000: old priority 0, new priority 19 New version: $ renice 19 10 -u fra -g 1 renice: failed to set priority for 10 (process ID): Operation not permitted renice: failed to set priority for 1000 (user ID): Operation not permitted renice: failed to set priority for 1 (process group ID): Operation not permitted $ renice 19 -u fra 1000 (user ID) old priority 0, new priority 19 Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-12-03ipc: remove .info fileKarel Zak1-1107/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-01lscpu: use GPLv2+Karel Zak1-4/+5
CAI Qian and I agree that GPLv2+ is better for lscpu.c. This license is more compatible (than v3) with the rest of the util-linux package. We need to link the code with functions from lib/ -- mix GPLv3 and GPLv2 is bad idea. Note that it was only Cai and I who did significant changes to lscpu.c, all others changes from others developers was trivial (fix typos, add _(), ...). Signed-off-by: CAI Qian <caiqian@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30renice: rewrite usage()Karel Zak1-12/+23
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30renice: update man page (nice rlimit was added to kernel)Francesco Cosoleto1-3/+3
Non-root tasks can raise nice priority on systems running Linux 2.6.12 or higher if the nice resource limit is set. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-11-30renice: reverse %s position in error messagesFrancesco Cosoleto1-2/+2
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-11-30renice: remove hardcoded program name using warn() and warnx()Francesco Cosoleto1-10/+6
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-11-30renice: make some functions staticFrancesco Cosoleto1-3/+3
2010-11-30rename util-linux-ng back to util-linuxKarel Zak22-43/+43
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-29fstrim: fix typoKarel Zak1-1/+1
Reported-by: Jeroen Oortwijn <oortwijn@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26rtcwake: use err.h routinesKarel Zak2-71/+58
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26rtcwake: add 'show' mode for rtc alarmMarek Otahal2-20/+94
The 'show' mode prints information on current alarm setting. [kzak@redhat.com: - code clean up - don't setup alarm on 'disable' mode] Signed-off-by: Marek Otahal <markotahal@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26fstrim: add new commandLukas Czerner4-3/+242
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>
2010-11-24fallocate: fix typoKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23lib: [strutils] general purpose string handling functionsDavidlohr Bueso2-2/+2
This patch replaces a few functions used throughout the source: * Renames getnum (from schedutils) to strtol_or_err * Moves strtosize (from lib/strtosize.c) * Moves xstrncpy (from include/xstrncpy.h) * Adds strnlen, strnchr and strndup if not available (remove it from libmount utils) A few Makefile.am files were modified to compile accordingly along with trivial renaming in schedutils source code. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-09docs: remove ipc.texi (info with IPC API docs)Karel Zak2-1315/+0
The IPC API documentation is maintained in the standard man-pages. It does not make sense to maintain this docs in util-linux-ng. Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-01sys-utils: make use xalloc wrappersDavidlohr Bueso4-52/+21
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-10-25Merge remote branch 'origin/master'LaMont Jones1-29/+18
2010-10-21ctrlaltdel: use err() instead of fprintf() and exit()Marek Polacek1-29/+18
[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-18Merge remote branch 'origin/master'LaMont Jones4-5/+9
2010-10-07lscpu: really use 'mode' argument in path_fopen()Petr Uzel1-1/+1
2010-10-07flock: use more useful example in flock.1Jakob Unterwurzacher1-1/+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-07fallocate: fix build failure with old linux headersMike Frysinger1-1/+5
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-09-17lscpu: update lscpu.1 to include new additions.Davidlohr Bueso1-2/+2
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-09-06Merge remote branch 'origin/master'LaMont Jones4-28/+128
Conflicts: mount/lomount.c
2010-08-20lscpu: support sysfs without cpu/online fileKarel Zak1-7/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-20lscpu: add byte order and bogoMIPS informationDavidlohr Bueso1-1/+12
Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-20flock: properly report exec() errorsKarel Zak1-1/+1
Reported-by: Barry Davis <barry_davis@stormagic.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-11lscpu: add -x and {On,Off}-line CPU(s) mask/listKarel Zak2-17/+60
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-11lscpu: support offline CPUsKarel Zak1-9/+52
# 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-04dmesg: fix memory leak in dmesg(1).Davidlohr Bueso1-2/+3
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-08-02Merge remote branch 'origin/master'LaMont Jones14-817/+700
Conflicts: mount/Makefile.am sys-utils/ipcs.c tests/ts/blkid/images-fs/befs.img.bz2 tests/ts/blkid/images-fs/ddf-raid.img.bz2
2010-07-29build-sys: man aliases don't depend on original man pageDiego Elio 'Flameeyes' Pettenò1-1/+1
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-29build-sys: use the silent-rules prefix when generating man pages.Diego Elio 'Flameeyes' Pettenò1-1/+1
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-26portability: use standard constantsFrançois Revol1-1/+1
Signed-off-by: François Revol <revol@free.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-07flock: fix file number in flock.1 man pagePatrice Dumas1-2/+2
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-06-30lscpu: replace LC_MESSAGES with LC_ALL in setlocate()Francesco Cosoleto1-1/+1
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-30ipcrm: remove redundant message in case of invalid optionFrancesco Cosoleto1-2/+0
This leaves getopt() only to print a similar error message on invalid options. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>