* 'fix-tests-ppc' of https://github.com/rudimeier/util-linux:
tests: fix fdisk/bsd again for big endian
tests: fix swaplabel test for 9a83b03c
Revert "tests: simplify and update swaplabel test"
Repeating a search for a pattern that did not found made more(1) to
crash. To reproduce 'more /etc/services' and search for 'doom'; you will
find a service in port 666 - pressing '.' after that result used to cause
core dump.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
After mkswap refactoring we have still a "minimal swap size"
wich depend on PAGE_SIZE. Next commit will fix the test for
output changes made in 9a83b03c.
This reverts commit b4d27255f2.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
It's better to use exact and explicitly defined types (e.g. uint64_t)
rather than something like off_t to make code more portable.
[reported with gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3)]
The patch also fixes one debug message.
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
The printout of the table headers and the bottomline descriptions
were lacking calls to gettext().
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
When the terminal has less than 32 lines, the new cfdisk ignored the
fact that the help-screen text was longer and just skipped printing
the remaining lines. Instead of introducing a minipager for the help
screen, just condense its text and remove unneeded lines. Now the
text occupies just 25 lines, which should fit on most terminals.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Asking for the translation of the empty string ("") produces the header
of the PO file corresponding to the current locale, which messes up the
help screen. So, don't use empty strings in the array of help strings
but (arbitrary) double spaces.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Also improve the description: notime, notq, and nohost are literals,
not things to be replaced by something else -- so no angular brackets.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Messages containing line breaks somehow look broken when additional time,
facility or level information is displayed, because they partly appear in
time/facility/level column.
Indent them accordingly.
Signed-off-by: Karel Zak <kzak@redhat.com>
Make compilation to work in systems which don't have sys/timex.h and its
ntp_gettime().
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Samuel Thibault <sthibault@debian.org>
Intel compiler complains about printf style function calls with trivial
format string and no other arguments. Like this one:
../sys-utils/ipcrm.c(117): warning #2279: printf/scanf format not a string literal and no format arguments
err(EXIT_FAILURE, iskey ? _("key failed") : _("id failed"));
icc needs -Werror to let %m fail and to avoid this:
../libmount/src/tab_parse.c(61): warning #269: invalid format string conversion
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Our macro UL_WARN_ADD could not discover these ones:
icc: command line warning #10006: ignoring unknown option '-Wmissing-parameter-type'
icc: command line warning #10006: ignoring unknown option '-Wredundant-decls'
icc: command line warning #10006: ignoring unknown option '-Wunused-result'
icc: command line warning #10006: ignoring unknown option '-Wnested-externs'
We need to use AC_LANG_WERROR.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
LD_LIBRARY_PATH must be preserved like it's done in libtool's
temporary wrapper scripts.
This problem was noticed when building with Intel's icc (15.0.0):
$ make check TS_OPTS="libmount"
$ tail tests/diff/libmount/tabfiles-py-parse-mtab
[...]
+Traceback (most recent call last):
+ File "/tmp/util-linux/libmount/python/test_mount_tab.py", line 8, in <module>
+ import pylibmount as mnt
+ImportError: libimf.so: cannot open shared object file: No such file or directory
... although libimf.so was in LD_LIBRARY_PATH.
NOTE 1:
When running root checks "sudo -E" is not enough to preserve
LD_LIBRARY_PATH because glibc already removes is. This would work:
$ sudo -E env LD_LIBRARY_PATH=$LD_LIBRARY_PATH make check TS_OPTS="--parallel=1"
NOTE 2:
We also preserve PYTHONPATH which could bring us similar problems if
the user has a customized python installation.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
It's backwardly incompatible nonsense to prefer mtab on remount.
mount -o remount /foo
has to read mount options from fstab otherwise the remount has no
effect. (The ideal solution would be to read both mtab, then modify
the options according to fstab -- but for now more important is to be
backwardly compatible.)
References: https://bugzilla.redhat.com/show_bug.cgi?id=1182778
Signed-off-by: Karel Zak <kzak@redhat.com>