| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| | |
* 'tests-setarch' of https://github.com/rudimeier/util-linux:
tests: improve setarch tests, regarding --uname-2.6 issues
setarch: add "exec" message to --verbose
build-sys: ignore vim .swp files
|
| |
| |
| |
| |
| |
| | |
Also we don't need fflush() in non-verbose case.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is a segfault in do_shm_global() when ipc_shm_get_info() return 0 and
ipc_shm_free_info() is called.
When no shm id is found, the memory allocated in shmds by ipc_shm_get_info() is
already free when ipc_shm_free_info() is called.
Move ipc_shm_free_info(shmds) inside the if statement where at least one shm id
is found.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
The features file is there from 2.6.31 when Xen has been added to
kernel. Sorry.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nowadays, most Intel CPUs have "cpuid faulting" available which could trap
the execution of "cpuid" instruction when CPL>0 with GP fault. Thus,
"cpuid" instruction could trap to Xen hypervisor on the paravirtualized PV
guest on most servers today, except on old CPUs prior to 2011. On CPU after
2011, Xen will put "XenVMMXenVMM" on both HVM and PV guests, which could
have lscpu command erroneously classify the guest as type "full". The
current lscpu command, which is based on "cpuid" instruction, still assumes
that it will not cause the trap to Xen hypervisor on Xen PV guest and uses
/proc/xen to identify whether it's running on PV DomU or not. To identify
this kind of information under the help of
/sys/hypervisor/properties/features would be more accurate for the CPU
nowadays. The bit 5 (XENFEAT_mmu_pt_update_preserve_ad) of the features
will be set only when it's running on Xen PV domain. The combo of bit 3 and
8 (XENFEAT_supervisor_mode_kernel and XENFEAT_hvm_callback_vector) will be
set simultaneously only when it's running on Xen PVH domain.
[kzak@redhat.com: - add path_exist()]
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| | |
* '2016-03-02/cgns' of https://github.com/hallyn/util-linux:
Implement support for cgroup namespaces
|
| |
| |
| |
| |
| |
| | |
Currently these are supported in #for-next.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Print a warning (instead of header) if --limits fails, like we did
it in past (2.20.1) and like we are still doing for --summary. Note
in past we were printing the same message like for --summary
"kernel not configured for ...", but actually this message is not
really correct.
This patch simply consolidates the current behavior. Probably we
should refactor it regarding warnings (stderr) and exit codes.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Re-add backward compatibility which got lost in 058e8154.
Initializing unknown struct members to 0xdead is similar to
the fallback.
For upward compatibility ignore columns > 16 but not the whole
line (in case the kernel would add more columns in future).
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We want to parse 16 columns _per_row_ without mixing them up. The
existing code is unsafe for more or less columns and could even
run into endless loops. This patch assures that we parse row-wise
and really skip lines with columns != 16.
Probably somehow we could have also done this with fscanf() only.
Using fgets() additionally makes the code more easy to read and
to improve later.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old version has been pretty broken... the most important is to
keep swap options specified on command line as read-only template.
For example if we call "swapon --all" then we cannot modify the global
options for each fstab swap entry.
The another story has been control struct modification due to device
reinitialization etc.
This patch splits all to:
* struct swapon_control; top-level struct with command line options
* struct swap_device; this is device specific and never globally
maintained by swapon_control.
* struct swap_prop; used as global read-only template swap options
and per device swap options (when parse fstab).
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818252
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| |
| |
| |
| | |
Now the first one of certain ambiguous tags wins. Alternatively to
this patch we could have called free() before xstrdup().
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid ifdef which does not work with --sysroot. Our existing test
dumps produce even better output now for ppc and sparc.
The logic moved to the printing section.
CC: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| | |
This reverts commit 641350fe822e7f1ac10873dad9a364bdeaba8083.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch reverts 3ac03fe4d20558b55635a048d7f2fb0f5e85ee2a for
snapshots (--sysroot).
Yeah, poor-man solution. It would be really nice to have runtime
detection to support model overwriting also on snapshots.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| | |
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818252
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On Power System, lspcu presently displays system model number instead of
processor model name. 'model' tag in cpuinfo contains system model name,
not processor model. Instead it uses 'cpu' tag for processor model name.
Also it uses 'revision' tag for processor model.
Fix lspcu so that it displays processor model number. Also display processor
model name.
cpuinfo output on Power System:
...
...
processor : 127
cpu : POWER8E (raw), altivec supported
clock : 4322.000000MHz
revision : 2.1 (pvr 004b 0201)
timebase : 512000000
platform : PowerNV
model : 8286-42A
machine : PowerNV 8286-42A
firmware : OPAL
Output without this patch:
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 128
On-line CPU(s) list: 0-127
Thread(s) per core: 8
Core(s) per socket: 4
Socket(s): 4
NUMA node(s): 4
Model: 8286-42A
...
...
Output with this patch:
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 128
On-line CPU(s) list: 0-127
Thread(s) per core: 8
Core(s) per socket: 4
Socket(s): 4
NUMA node(s): 4
Model: 2.1 (pvr 004b 0201)
Model name: POWER8E (raw), altivec supported
...
...
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| |
| | |
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| |
| | |
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 'travis-osx' of https://github.com/rudimeier/util-linux:
travis: add OSX build
travis: switch to Ubuntu 14.04 Trusty
build-sys: improve uuidd and script build conditions
build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms
build-sys: add missing "not found" strings
build-sys: fix again UL_SCANF_TYPE_MODIFIER
tests: don't use system's mount commands
tests: improve skipping of old btrfs-tools
tests: remove invalid argument in libmount/debug
tests: skip old socat silently
misc: fix icc/clang compiler warnings
misc: fix printf i386 compiler warnings
|
| | |
| | |
| | |
| | | |
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Still a few printf warnings found on i386 Linux:
libfdisk/src/alignment.c: In function 'fdisk_align_lba':
libfdisk/src/alignment.c:115:3: warning: format '%ju' expects argument of type 'uintmax_t', but argument 6 has type 'long unsigned int' [-Wformat]
sys-utils/lsns.c: In function ‘add_namespace’:
sys-utils/lsns.c:346:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘ino_t’ [-Wformat]
sys-utils/lsns.c: In function ‘add_process_to_namespace’:
sys-utils/lsns.c:362:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘ino_t’ [-Wformat]
sys-utils/lsns.c: In function ‘add_scols_line’:
sys-utils/lsns.c:440:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘ino_t’ [-Wformat]
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The below demonstrates what happen before this change.
$ setsid --wait
setsid: child 3252 did not exit normally: Success
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The documentation for discard=pages is ambiguous in that it could be
interpreted to mean either that the pages are discarded immediately
after being freed or that the pages are discarded immediately before
being reused by a write. Both implementations would satisfy the
statement "discard freed swap pages before they are avaliable for
reuse", but the kernel does the former.
Doing a discard operation (which is non-queued on SATA drives before
SATA 3.1) before a write operation to the same sector is pointless
unless using, pre-SATA 3.1 drives, where discard is detrimental because
ATA TRIM is a non-queued command.
Anyone who wants discard operations on swap and interprets the man page
as describing the incorrect behavior would opt for discard=once over
discard, when discard provides the behavior of both discard=once and
discard=pages, which is what they likely want.
Lets make a small change to the documentation to clarify the behavior.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Mainly by using proper subsections (so they can be indexed),
protecting some things from hyphenation, and marking with \&
periods that don't end sentences. Tweaking some wordings too.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
This reverts commit 46a40c018438b7b2b25083a5e5a4a21055a0c1e9.
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| |
| |
| |
| |
| | |
BSD/Linux systems stick major/minor/makedev in sysmacros.h. Newer Linux
libraries have been moving away from including sysmacros.h implicitly via
sys/types.h, so include it directly.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Such cast could hide serious compiler warnings in case we are
missing includes (e.g. <stdlib.h> or "xalloc.h").
See
http://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| | |
When `rc` is `INT_MAX`, `rc + 1` result in signed integer overflow.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
If non-negative value returned, errno could be unset (especially 0).
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
remaining buffer space was increased after adding character, instead
of decreasing
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 'port-osx' of https://github.com/rudimeier/util-linux:
lib: include strutils.h for mempcpy()
build-sys: remove duplicate cal sources
lib: provide fallback if mkostemp(3) missing
build-sys: chrt requires a sched_set* function
build-sys: add --disable-ipcrm --disable-ipcs
build-sys: disable login-utils if shadow.h or utmp.h is missing
login-utils: minor utmp cleanup
build-sys: build_init should check for flock
newgrp: rename memset_s()
misc: fix some includes
libsmartcols: fix uninitialized variable
fdisk: fix warning, incompatible pointer types passing 'uint64_t *'
logger: use SCM_CREDENTIALS on LINUX only
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
features.h: any glibc header includes this already
libgen.h: was unused there
sys/uio.h: for writev(3p)
sys/queue.h seems like it was never used
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|