summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lsmem: improve node lookupHeiko Carstens2016-11-091-0/+1
| | | | | | | Break the loop as soon as we found the node a memory block belongs to, it doesn't make sense to continue scanning. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lsmem: (man page) recommend use --outputKarel Zak2016-11-091-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: align STATE to the rightKarel Zak2016-11-091-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: add CopyrightKarel Zak2016-11-092-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add x86_64-16g lsmem testKarel Zak2016-11-093-1/+272
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: cleanup and update lsmemKarel Zak2016-11-092-105/+126
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: add missing placeholdersKarel Zak2016-11-091-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: cleanup for --summary=onlyKarel Zak2016-11-091-0/+11
| | | | | | | * don't fill scols table * check for collision with raw,pairs and json options Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: cleanup man pageKarel Zak2016-11-092-62/+45Star
| | | | | | | | * add missing new options * remove columns description (for ls-like utils we maintains columns description only in the --help output) Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: disable summary for JSONm, raw and export outputKarel Zak2016-11-091-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: add --summary[=<when>] optionKarel Zak2016-11-091-12/+48
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: rename control structKarel Zak2016-11-091-67/+67
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: cleanup, use libsmartcols for all outputKarel Zak2016-11-091-188/+213
| | | | | | | | | * add --pairs, --raw a --json outputs * add --noheadings to disable header * add --bytes * add --output <list> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: mark lsmem and chmem as Linux onlyKarel Zak2016-11-091-2/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: add testcaseHeiko Carstens2016-11-095-0/+166
| | | | | | | | | | Add a single s390 specific test case to verify that the contents of various output formats do not change in incompatible way if the lsmem code is changed. This is based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* chmem: new toolHeiko Carstens2016-11-095-0/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the s390 specific chmem tool to util-linux. The chmem tool was originally written in perl and is part of the s390-tools package which can be found here: https://www.ibm.com/developerworks/linux/linux390/s390-tools.html Given that the tool is architecture independent, there is no reason to keep it in an s390 specific repository. It seems to be useful for other architectures as well. This patch converts the tool to C and adds it to util-linux, while the command line options stay compatible. The only exception is the option "-v" which used to be the short form of "--version". That got changed to "-V" so it behaves like most other tools contained within util-linux. The chmem tool can be used to set memory online or offline. This can be achieved by specifying a memory range: Memory Block 19 (0x0000000130000000-0x000000013fffffff) disabled or by specifying a size where chmem will automatically select memory blocks: Memory Block 21 (0x0000000150000000-0x000000015fffffff) disable failed Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled or by specifying memory block numbers instead of address ranges: Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled This is based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lsmem: new toolHeiko Carstens2016-11-095-0/+605
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the s390 specific lsmem tool to util-linux. The lsmem tool was originally written in perl and is part of the s390-tools package which can be found here: https://www.ibm.com/developerworks/linux/linux390/s390-tools.html Given that the tool is architecture independent, there is no reason to keep it in an s390 specific repository. It seems to be useful for other architectures as well. This patch converts the tool to C and adds it to util-linux, while the command line options stay compatible. The only exception is the option "-v" which used to be the short form of "--version". That got changed to "-V" so it behaves like most other tools contained within util-linux. The lsmem tool inspect the contents of /sys/devices/system/memory and prints a summary output similar to what lscpu does: RANGE SIZE STATE REMOVABLE BLOCK 0x0000000000000000-0x000000005fffffff 1,5G online yes 0-5 0x0000000060000000-0x000000007fffffff 512M online no 6-7 0x0000000080000000-0x000000013fffffff 3G online yes 8-19 0x0000000140000000-0x000000014fffffff 256M offline - 20 0x0000000150000000-0x000000017fffffff 768M online no 21-23 Memory block size : 256M Total online memory : 5,8G Total offline memory: 256M In order to keep the output small the tool merges subsequent address ranges where the attributes are identical. To avoid merging of line the "-a" option can be used. The lsmem tool also has "--extendend" and "--parsable" option which can be used to customize the output, e.g. limit the output to specified columns. This is quite similar to what the lscpu tool does. This is based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lib,strutils: add strtoux[16|32|64]_or_err functionsHeiko Carstens2016-11-092-6/+41
| | | | | | | Add helper functions which allow to parse hexadecimal numbers. Based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* build-sys: release++ (v2.29)Karel Zak2016-11-082-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update v2.29-ReleaseNotesKarel Zak2016-11-081-1/+50
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* po: merge changesKarel Zak2016-11-0827-7484/+8020
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* po: update zh_CN.po (from translationproject.org)Wylmer Wang2016-11-081-1614/+1171Star
|
* po: update uk.po (from translationproject.org)Yuri Chornoivan2016-11-081-195/+150Star
|
* po: update sv.po (from translationproject.org)Sebastian Rasmussen2016-11-081-194/+146Star
|
* po: update pl.po (from translationproject.org)Jakub Bogusz2016-11-081-233/+157Star
|
* po: update nl.po (from translationproject.org)Benno Schulenberg2016-11-081-212/+182Star
|
* po: update es.po (from translationproject.org)Antonio Ceballos Roa2016-11-081-188/+141Star
|
* po: update de.po (from translationproject.org)Philipp Thomas2016-11-081-2735/+2407Star
|
* tests: let lsmod fail silentlyRuediger Meier2016-11-071-2/+2
| | | | | | | This is mostly for non-Linux systems where lsmod is not even available. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: always quote $LODEVRuediger Meier2016-11-071-23/+23
| | | | | | | Since there is no error handling in this test $LODEV may be empty. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: replace sleep by udevadmRuediger Meier2016-11-071-11/+10Star
| | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> CC: Stanislav Brabec <sbrabec@suse.cz>
* tests: udevadm settle before losetup -dRuediger Meier2016-11-071-0/+10
| | | | | | | Fails on Debian 7 (wheezy), Kernel 3.2. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> CC: Stanislav Brabec <sbrabec@suse.cz>
* docs: update TODO fileKarel Zak2016-11-071-2/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: disable is_vmware_platform() for non-root usersKarel Zak2016-11-031-0/+9
| | | | | References: http://www.spinics.net/lists/util-linux-ng/msg13302.html Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: check for timeout progKarel Zak2016-11-031-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: wait for flock background processRuediger Meier2016-11-021-0/+10
| | | | | | | Maybe we should add a --daemonize option to flock to cover this use case. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* lsblk: add note about --sort and --list relationKarel Zak2016-11-022-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: sort by MAJ:MIN by defaultKarel Zak2016-11-021-0/+5
| | | | | | | Since Linux kernel 4.8 /sys entries are no more sorted and all is in the native order. It makes lsblk output messy. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: make scols_sort_table() usable for treesKarel Zak2016-11-021-3/+50
| | | | | | We also need to sort children when tree is enabled. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: fix typoKarel Zak2016-11-021-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add flock testsKarel Zak2016-10-319-0/+107
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* flocks: keep run_program() simpleKarel Zak2016-10-311-8/+7Star
|
* Merge branch 'fixes-for-v2.29' of https://github.com/rudimeier/util-linuxKarel Zak2016-10-318-45/+22Star
|\ | | | | | | | | | | | | | | * 'fixes-for-v2.29' of https://github.com/rudimeier/util-linux: misc: once again some printf format strings misc: fix some compiler warnings chrt: fix HAVE_SCHED_SETATTR fallback case fdisk: fix memleak in list_disk_geometry()
| * misc: once again some printf format stringsRuediger Meier2016-10-273-5/+7
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * misc: fix some compiler warningsRuediger Meier2016-10-274-37/+9Star
| | | | | | | | | | | | | | | | | | | | libsmartcols/samples/fromfile.c:59:2: warning: passing argument 3 of 'string_to_bitmask' from incompatible pointer type text-utils/pg.c:79:0: warning: "TABSIZE" redefined libblkid/src/read.c:455:13: warning: 'debug_dump_dev' defined but not used [-Wunused-function] libblkid/src/probe.c:769:13: warning: unused function 'cdrom_size_correction' [-Wunused-function] /usr/include/sys/termios.h:3:2: warning: "this file includes <sys/termios.h> which is deprecated, use <termios.h> instead" [-W#warnings] Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * chrt: fix HAVE_SCHED_SETATTR fallback caseRuediger Meier2016-10-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | Broken since 6f27e449. We could not enter the fallback if HAVE_SCHED_SETATTR is not defined. Two gcc warnings made this issue visible: schedutils/chrt.c:247:1: warning: label 'fallback' defined but not used [-Wunused-label] schedutils/chrt.c:266:9: warning: 'policy' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * fdisk: fix memleak in list_disk_geometry()Ruediger Meier2016-10-271-1/+3
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | flock: fix no-flock patchKarel Zak2016-10-311-17/+28
| | | | | | | | | | Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842598 Signed-off-by: Karel Zak <kzak@redhat.com>
* | mount: append inverting options for mount.<type> on "users"Karel Zak2016-10-271-1/+2
|/ | | | | | | | | | | | | | | If you call mount(8) as root, then we need to append inverting options (if specified by fstab) for "user" and "users" to /sbin/mount.<type> command line, because for UID=0 mount.nfs follows command line rather than the fstab setting. This has been originally implemented by commit a4c0cc75ff9744299f108c259efab1bd30c8007a for the old mount(8). The same feature is supported by libmount, unfortunately for "user" only. We need the same also for "users" to be backwardly compatible. Addresses: https://github.com/karelzak/util-linux/issues/368 Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: cleanup labelitem initializationKarel Zak2016-10-273-2/+12
| | | | | | | | * use macro for label initialization * make sure we do not call fdisk_ref_labelitem() and fdisk_unref_labelitem() for non-allocated items Signed-off-by: Karel Zak <kzak@redhat.com>