Commit Graph

12448 Commits

Author SHA1 Message Date
Karel Zak 685f544918 chrt: fix compiler warning [-Wmaybe-uninitialized]
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-20 10:43:32 +01:00
Karel Zak ac52836781 fsck: cleanup find_fsck()
* remove static variable
* return 0 or 1
* optionally return allocated path to the program

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-19 13:05:45 +01:00
Karel Zak 3476084d14 lsblk: document LSBLK_DEBUG=
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-16 19:10:35 +01:00
Karel Zak 3b814f1990 Merge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux 2018-02-16 11:38:18 +01:00
Ruediger Meier a8d674955a tests: use pgrep instead of ps --ppid ...
The usage looks a bit cleaner, and I guess that pgrep(1) is available
on the same machines where "ps --ppid" would work (procps-ng).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:29:49 +01:00
Karel Zak 7595bed189 Merge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux
* 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux:
  tests: use pgrep instead of ps --ppid ...
  misc: fix typos using codespell
  lsns: fix clang compiler warning
  tests: add udevadm settle to sfdisk/resize
  build-sys: disable bz2 tarball and fix some am warnings
2018-02-16 11:25:22 +01:00
Ruediger Meier 7eb1320bf7 tests: use pgrep instead of ps --ppid ...
The usage looks a bit cleaner, and I guess that pgrep(1) is available
on the same machines where "ps --ppid" would work (procps-ng).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:20:42 +01:00
Ruediger Meier 73afd3f8e8 misc: fix typos using codespell
Some more funny typos, please review carefully.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:12:52 +01:00
Ruediger Meier 58b29eedb0 lsns: fix clang compiler warning
../sys-utils/lsns.c:360:8: warning: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'int' [-Wsign-compare]
        if (!(NLMSG_OK(nlh, reslen)
              ^~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/netlink.h:90:24: note: expanded from macro 'NLMSG_OK'
                           (nlh)->nlmsg_len <= (len))
                           ~~~~~~~~~~~~~~~~ ^   ~~~

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:12:44 +01:00
Karel Zak 5b1c32b887 fsck: coding style cleanup
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-16 10:50:14 +01:00
Theodore Ts'o 8bad4fc0d5 fsck: use xasprintf to avoid buffer overruns with an insane fs type
This prevents a crash when running the command:

fsck -t AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA /dev/sda

Reported-by: Hornseth_Brenan@bah.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-02-16 10:50:03 +01:00
Ruediger Meier 497a261ada tests: add udevadm settle to sfdisk/resize
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-15 21:32:15 +01:00
Ruediger Meier 316795fcb3 build-sys: disable bz2 tarball and fix some am warnings
Nobody needs the .bz2 tarball. We dont't even upload it to
kernel.org.

BTW we fix dozens of these automake warnings:

    automake-1.13/am/ltlibrary.am: warning: 'libblkid.la': linking libtool libraries using a non-POSIX
    automake-1.13/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'

So we can remove -Wno-portability. The only warning left is this
last GNU-make'ism which somebody may fix when reading it:

   sys-utils/Makemodule.am:191: warning: addprefix sys-utils/,$(SETARCH_LINKS: non-POSIX variable name
   sys-utils/Makemodule.am:191: (probably a GNU make extension)
   Makefile.am:90:   'sys-utils/Makemodule.am' included from here

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-15 21:30:32 +01:00
taiyu 0f9b4f2f3a libsmartcols: fixes issue with 0 width columns
[kzak@redhat.com: - it's possible that column has zero width when
 minimal width is reduced due to very small terminal. In this case
 make sure that we do not use such column at all.]

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-15 12:27:23 +01:00
Karel Zak 0f9f927b6f libsmartcols: set minimal column width to 1
The default is to use header width or relative width setting as the
minimal column width. The problem are columns where is no header or
relative width. Let's set minimal width to 1 in this case.

Addresses: https://github.com/karelzak/util-linux/pull/577
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-15 12:20:17 +01:00
Karel Zak 19b10b8978 libsmartcols: interpret zero width for pending data as error
The command

 $ column -t -W2 -c11 <<< "cat dog bird"

causes finite loop, because there is no minimal column width (missing
header). The print functions should be robust enough to return -EINVAL
when nonsense is requested.

Addresses: https://github.com/karelzak/util-linux/pull/577
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-15 11:58:41 +01:00
Riku Voipio dd9b4cb320 lscpu-arm: add Faraday And Brahma cores
Add a handful of more rare cores. Broadcom Brahma cores are
used in Access Points and Faraday was used on some Network
Storage Devices.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2018-02-13 15:25:20 +02:00
Karel Zak 37ae6191f7 docs: update v2.32-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-13 12:22:15 +01:00
Karel Zak 94ee61dd9a docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-13 11:16:02 +01:00
Karel Zak 80bbf3b591 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-13 11:02:07 +01:00
Yuri Chornoivan 40cbda080b po: update uk.po (from translationproject.org) 2018-02-13 10:56:08 +01:00
Rafael Fontenelle 73e99e048e po: update pt_BR.po (from translationproject.org) 2018-02-13 10:56:08 +01:00
Jakub Bogusz 6c99d3d9b7 po: update pl.po (from translationproject.org) 2018-02-13 10:56:08 +01:00
Takeshi Hamasaki 0fa1924e33 po: update ja.po (from translationproject.org) 2018-02-13 10:56:08 +01:00
Lauri Nurmi eaae23ab8b po: update fi.po (from translationproject.org) 2018-02-13 10:56:08 +01:00
Antonio Ceballos Roa 148e879725 po: update es.po (from translationproject.org) 2018-02-13 10:56:08 +01:00
Petr Písař 731cec32f0 po: update cs.po (from translationproject.org) 2018-02-13 10:56:08 +01:00
Karel Zak dd83526ae3 dmesg: use xstrdup() in xalloc.h based util
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-13 10:52:57 +01:00
Karel Zak 3289bd6eef tests: update build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-13 10:42:44 +01:00
Karel Zak dcca7846c0 libblkid: make mpool independent on libuuid
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-13 10:30:39 +01:00
Karel Zak 1800de76ba tests: column(1) test for space-char separator
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-12 14:19:47 +01:00
Karel Zak f2c3c3a14f tests: column(1) test non-space separator at begin of line
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-12 14:14:50 +01:00
Karel Zak 5c7b67fbbf column: don't ignore space-char separators at begin of the line
Non-space separator:

	$ echo -e ",col1,col2\nrow,1,2" | column -t -s ","  --table-columns A,B,C
	A    B     C
	     col1  col2
	row  1     2

Space-char (\t) separator:

	$ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')"  --table-columns A,B,C
	A     B     C
	col1  col2
	row   1     2

Fixed version:

	$ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')"  --table-columns A,B,C
	A    B     C
	     col1  col2
	row  1     2

Addresses: https://github.com/karelzak/util-linux/issues/575
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-12 14:06:02 +01:00
Samuel Thibault 4365c8107f su: build fix for the case where USE_PTY is not defined
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-12 12:09:40 +01:00
Karel Zak d51f05bfec lsblk: try device/dev to read devno
Now sysfs_devname_to_devno() reads devno from /dev or
/sys/block/<name>/dev, but it seems that NVME uses
/sys/block/<name>/device/dev.

Reported-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-09 14:18:18 +01:00
Karel Zak 256298191c docs: update TODO
Let's think about "mount --onlyonce".

Addresses: https://github.com/karelzak/util-linux/issues/448
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-07 11:37:32 +01:00
Karel Zak a31bb9b6a1 cal: clean up man page synopsis syntax
Let's use '[ ]' rather than '< >' to be compatible with our another
man pages. Note that all time addressing on cal(1) command line is
optional.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1542883
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-07 11:19:44 +01:00
Karel Zak 7aa670f66f docs: update TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-07 10:36:28 +01:00
Karel Zak 8e782a8395 mount: add note about "already mounted" behavior
Addresses: https://github.com/karelzak/util-linux/issues/448
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-05 12:18:49 +01:00
Karel Zak 73f617ca63 tests: add mpool blkid test image
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-05 11:58:09 +01:00
Jakub Wilk f04c77f0a3 findmnt.8: remove spurious spaces before "--tree" and "--verbose"
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2018-02-04 19:31:17 +01:00
Karel Zak f3932a6bb5 tests: rewrite cal(1) bigyear test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-02 10:31:24 +01:00
Karel Zak 22db7b5132 tests: use TS_HELPER_CAL
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-02 10:16:27 +01:00
Karel Zak b9d9ab7dae cal: add ifdef TEST_CAL
The test program follows CAL_TEST_TIME=<sec> rather than libc time().
It allows to use cal(1) in regression tests in cases where output
depends on the current time.

(We already use the same for example for logger.)

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-02 10:05:15 +01:00
Karel Zak 7895231321 tests: update setarch test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-01 16:53:45 +01:00
Karel Zak 8d31f146ed libmount: fix debug message
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-01 16:52:14 +01:00
Karel Zak fd777151bf sys-utils: use errexec()
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-01 15:44:25 +01:00
Karel Zak 7bc5eeee44 vipw: use errexec()
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-01 15:41:42 +01:00
Karel Zak 856fcfd104 newgrp: use errexec()
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-01 15:41:23 +01:00
Karel Zak 61b6222269 schedutils: use errexec()
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-01 15:40:59 +01:00