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>
New BDS test based on hexdump, this commit provides:
bsd_0_64.BE - generated on ppc64
bsd_0_64.LE - generated on ppc64le
bsd_1_0.LE - generated on x86_64
bsd_1_0.BE - generated on s390
the last missing is Alpha where all is different :-)
Signed-off-by: Karel Zak <kzak@redhat.com>
It seems better to use hexdump rather than md5sum, but it means that
we have to gather hexdumps of the all possible BSD variants. For this
purpose will be introduced a new bsd fdisk test and to verify the
new hexdumps we can use this old test as both tests are exactly the
same.
Signed-off-by: Karel Zak <kzak@redhat.com>
There are special __alpha__ ifdefs in libfdisk/src/bsd.c
Regarding 565964a9 and a80886e9.
BTW it was a bad idea to use md5sum. In case of failure it
would be much easier to debug hexdump diffs. Now it's nearly
impossible to collect all these exotic hexdumps.
CC: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This patch reverts 3ac03fe4d2 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>
Commit 11b86e1733 changed printf() to puts() in favour of more simple
function, but forgot that puts() adds a new line to end of string. That new
line is neither needed, or expected, so use fputs() that is both a simple
printing function and comes without new line side effect.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Currently the code supports /dev/name or PARTUUID= only. We also
need to support 'maj:min' and 'hexhex' notations.
Reported-by: George Spelvin <linux@horizon.com>
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>
Earlier completion suggested only options for the command, this changes
options to be proposed when first character of an argument is dash.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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>
Earlier printout had strange looking 'Success'.
$ isosize --sectors /dev/urandom
isosize: /dev/urandom: might not be an ISO filesystem
isosize: 733error: le=-1971599244 be=1633181607: 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>
Of course OSX is not an important target but since it's available on
travis we can (mis)use it to generally improve non-Linux and non-GNU
compatibility. People are using musl, busybox or whatever and
util-linux should work for them. Having OSX build running regularly
will help us to freeze the lately improved BSD compatibility and
to check code which is usually ifdef'ed.
We are using the most recent OSX 10.11.x / Xcode 7.3 though the older
travis OSX images are working too currently.
If it turns out that this OSX build is too annoying when we are about
to add support for latest Linux features then we could add:
allow_failures:
- os: osx
to let it fail silently.
Note I've tried hard to keep .travis-functions.sh readable for the
Linux case. I've removed --with-python because it's default anyway,
--enable-gtk-doc is still tested in discheck.
OSX root check would also work (almost, using another --prefix) but
would only run one more test yet (minix).
OSX distcheck would have some issues with conditionally built man
pages and does not work with default distcheck confopts. No need to
fix that because distcheck is more for maintainer machines.
BTW to increase travis build speed again we could remove some targets
from the matrix without losing tested scenarios:
- nonroot for Linux seems to be waste of time
- clang/Linux could be root check only
For now we keep it as is.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Now we have a reasonable recent build system with systemd, etc. We still
keep old Ubuntu 12.04 Precise to check backward compatibility but
remove the hack to install socat.
Note the new env variable PRECISE="yes" is only there to see it on travis
website.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>