summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drone-ci' of https://github.com/rudimeier/util-linuxKarel Zak2015-03-173-11/+22
|\
| * tests: optionally skip tests where loop support is neededRuediger Meier2015-03-161-0/+4
| | | | | | | | | | | | | | | | | | It can be hard to check for loop support (e.g. on LXC containers). Let the user skip it manually by env: TS_OPT_FEAT_SKIP_LOOP="yes" Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * travis: whitelist travis* branchesRuediger Meier2015-03-161-0/+1
| | | | | | | | | | | | Sometimes we may want to test non-master branches. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * travis: move install script to .travis-functions.shRuediger Meier2015-03-162-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now this snippet can be re-used by non-travis systems. For example on drone.io we can use this simple build script: ...... MAKE_CHECK="root" source ./.travis-functions.sh travis_install_script || exit travis_before_script || exit ret=0 travis_script || ret=$? travis_after_script exit $ret ...... Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: use ts_skip for logger/journaldKarel Zak2015-03-171-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | Since 569d1dac7bc64457aac11163b6a91ce9b41a6715 we read device startKarel Zak2015-03-171-2/+3
| | | | | | | | | | | | | | | | sector from the /sys/block/.../start file. The file exists only for partitions, for wholedisk is the start of the device always zero. References: https://bugzilla.redhat.com/show_bug.cgi?id=1202443 Signed-off-by: Karel Zak <kzak@redhat.com>
* | hwclock: cosmetic changes to man pageKarel Zak2015-03-171-7/+8
| | | | | | | | | | Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* | Merge branch 'hwman312' of https://github.com/jwpi/util-linuxKarel Zak2015-03-171-44/+40Star
|\ \
| * | hwclock: man-page errataJ William Piggott2015-03-131-22/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The information I wrote regarding clock crystals was not only incomplete, it was wrong. The characteristics of quartz crystals is beyond the scope of this man-page. It was misguided to attempt to include it. This commit removes said information. Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * | hwclock: add '11 minute mode' informationJ William Piggott2015-03-131-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | Add that '11 minute mode' is a kernel compile time option. Add details regarding its activation and how to check its status. Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * | hwclock: remove depreciated ntpdateJ William Piggott2015-03-131-2/+2
| | | | | | | | | | | | | | | | | | Replace references to the depreciated ntpdate with sntp. Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * | hwclock: Improve FILES sectionJ William Piggott2015-03-131-5/+11
| | | | | | | | | | | | Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * | hwclock: add TZDIRJ William Piggott2015-03-131-5/+12
| | | | | | | | | | | | | | | | | | | | | Add information about TZDIR and improve the ENVIRONMENT section. Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | | build-sys: add new compiler warningsKarel Zak2015-03-171-0/+2
| | | | | | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | | Merge branch 'tests_logger' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2015-03-1721-5/+333
|\ \ \
| * | | libblkid: fix compiler warningsSami Kerola2015-03-172-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | warning: extra ';' outside of a function [-Wextra-semi] warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | | tests: add logger(1) journald testSami Kerola2015-03-172-0/+38
| | | | | | | | | | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | | tests: add logger(1) error condition testsSami Kerola2015-03-179-0/+74
| | | | | | | | | | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | | tests: add logger(1) message format testsSami Kerola2015-03-178-0/+215
| | |/ | |/| | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* / | tests: remove warning from test outputRuediger Meier2015-03-171-1/+0Star
|/ / | | | | | | | | | | This was added in 3f8478a7 but it's only printed in --help. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: disarm tailf testRuediger Meier2015-03-161-0/+4
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tailf: deprecatedRuediger Meier2015-03-164-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | We want to remove it in 2 years, March 2017. See discussion "tailf, really needed?" http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/10967 [kzak@redhat.com: - move warning to usage()] Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: use --no-act for logger testsKarel Zak2015-03-161-9/+9
| | | | | | | | | | | | and also use --stderr on one place only. Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add logger(1) command line options testsSami Kerola2015-03-1614-0/+79
| | | | | | | | | | | | | | [kzak@redhat.com: - use LOGGER_TEST_* env] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* | logger: add -DTEST_LOGGERKarel Zak2015-03-163-6/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "make test_logger" now compiles logger(1) test program to overwrite system datetime stuff, hostname and PID, for example: export TZ=GMT export LOGGER_TEST_TIMEOFDAY=1234567890.123456 export LOGGER_TEST_HOSTNAME=foo export LOGGER_TEST_GETPID=123 ./test_logger --rfc5424 --no-act --stderr -i --tag MyTag mesg <13>1 2009-02-13T23:31:30.123456+00:00 foo MyTag 123 - [timeQuality tzKnown="1" isSynced="0"] mesg if the LOGGER_TEST_* variables are not specified then default to standard logger(1) behavior. Note that it would be possible to use for example "unshare --utc" to make hostname stable and portable, but LOGGER_TEST_* variables allow to keep the tests less complex. Signed-off-by: Karel Zak <kzak@redhat.com>
* | logger: add --no-act for testingKarel Zak2015-03-162-14/+37
| | | | | | | | | | | | | | | | | | | | * force --journal mode to also output to stderr when the option --stderr specified on command line * add --no-act to avoid all write() operations to make it possible to write tests without "spam" system logs Signed-off-by: Karel Zak <kzak@redhat.com>
* | logger: fix rfc5424 format crashKarel Zak2015-03-161-1/+2
| | | | | | | | | | | | | | | | $ logger --rfc5424=notq message Segmentation fault (core dumped) Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* | logger: use errx() when checking user inputSami Kerola2015-03-161-2/+2
| | | | | | | | | | | | Additionally inform in usage() the --msgid requires an argument. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | logger: check xgethostname() return valueSami Kerola2015-03-161-7/+10
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | logger: tidy few indentation issuesSami Kerola2015-03-161-57/+58
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | logger: Fix use of errno after strtol() without zeroing firstStef Walter2015-03-161-0/+1
|/ | | | | References: https://bugzilla.redhat.com/show_bug.cgi?id=1202104 Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: use xstrdup()Karel Zak2015-03-131-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix fdisk/bsd for ppc64leRuediger Meier2015-03-131-2/+2
| | | | | | | | | | | | Actually Aurelien's patch a80886e9 should have addressed this already because it's the case LE, BSD_LABELSECTOR = 0, BSD_LABELOFFSET = 64. I've asked about this on mailing list but couldn't get more informations. Thread "test fdisk/bsd on exotic archs": http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/10621 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: improve readability for fdisk/bsdRuediger Meier2015-03-131-6/+10
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* last: keep array of files in main()Karel Zak2015-03-131-32/+22Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* last: fix utmplist usageKarel Zak2015-03-131-16/+21
| | | | | | | | | | | | | last(1) uses a global list of entries, this is unnecessary and it's also mistake because the pointer to the list is not set to NULL when last(1) opens another utmp file. For example: last -f /var/log/wtmp -f /var/log/wtmp-20150220 ends with unexpected free() call or sometimes with never ending loop. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1201033 Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: care about setuprterm() resultKarel Zak2015-03-121-21/+38
| | | | | References: https://bugzilla.suse.com/show_bug.cgi?id=903440 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: mark overlay as pseudo-FSKarel Zak2015-03-111-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_table_get_fs_root() to header fileKarel Zak2015-03-111-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master-silence-format-printf-warning' of ↵Karel Zak2015-03-111-1/+2
|\ | | | | | | https://github.com/rgerhards/util-linux
| * silence compiler warningRainer Gerhards2015-03-101-1/+2
| | | | | | | | | | This is primarily cosmetic, albeit it also provides an only very slight improvement in compile time error checking.
* | tests: update sfdisk --dump testKarel Zak2015-03-111-0/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | logger: small change in usage()Karel Zak2015-03-111-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | logger man page: fix typoRainer Gerhards2015-03-101-1/+1
| |
* | logger: add --msgid option, permits to set RFC5424 MSGID fieldRainer Gerhards2015-03-102-4/+19
| |
* | logger: fix multiple format bugs in rfc5424 formatterRainer Gerhards2015-03-101-21/+57
|/ | | | | | This is more or less a complete rewrite of the formatter. It had multiple issue, e.g. a missing field (MSGID?) and invalid handling of nil values.
* libmount: cleanup fs root detection codeKarel Zak2015-03-107-60/+26Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: don't rely on st_dev for --targetKarel Zak2015-03-103-10/+20
| | | | | | | | | | | | The overlay filesystem does not provide usable st_dev (in traditional UNIX way). It's necessary to search in /proc/self/mountinfo to detect which path element is mountpoint. $ findmnt --target /mnt/merged/dir-a/foo TARGET SOURCE FSTYPE OPTIONS /mnt/merged overlay overlay rw,relatime,lowerdir=/mnt/low,upperdir=/mnt/high/data,workdir=/mnt/high/work Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: check for ntp_gettime() rather than for timex.hKarel Zak2015-03-102-4/+4
| | | | | | | | It seems that musl libc and uClibc without UCLIBC_NTP_LEGACY does not provide ntp_gettime and compile will fail. References: https://github.com/karelzak/util-linux/issues/174 Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: add --skip-empty-lines to prevent logging empty linesRainer Gerhards2015-03-103-4/+20
| | | | | | | | | | | Empty log messages are generally considered useless. This option enables to turn them off when processing files (including stdin). [kzak@redhat.com: - rename --skip-empty-lines to --skip-empty, - add the option to getopt_long(), - add the option to bash-completion] Signed-off-by: Karel Zak <kzak@redhat.com>