Commit Graph

13289 Commits

Author SHA1 Message Date
Karel Zak 36fcefa651 libmount: don't use sscanf() for fstab parsing
Addresses: https://github.com/karelzak/util-linux/issues/780
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-08 13:34:47 +02:00
Karel Zak f1428af5be Merge branch 'spelling' of https://github.com/jwilk-forks/util-linux
* 'spelling' of https://github.com/jwilk-forks/util-linux:
  docs: fix typo
2019-04-02 12:05:25 +02:00
Marcos Paulo de Souza e108643981 fstrim.c: Remove commnet about vfat not supporting fstrim
Commit f663b5b38f ("fat: add FITRIM ioctl for FAT file system") in
linux kernel added support for using fstrim with vfat filesystem.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2019-04-01 18:38:31 -03:00
Karel Zak c313ee737b tastset: (man) add :N stride for CPU lists
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-29 13:00:42 +01:00
Karel Zak 4534e4f2fb fsck: (man) labels are available for all filesystems
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-28 15:29:09 +01:00
Karel Zak 99c1ebee21 su: change error message
We use PAM and if pam_strerror() returns nothing we have no clue why
authentication failed. It's mistake to blame incorrect password if
there are many possible reason...

Addresses: https://github.com/karelzak/util-linux/issues/778
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-25 16:39:43 +01:00
Jakub Wilk 25d9f1403d docs: fix typo
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2019-03-22 13:27:33 +01:00
Karel Zak 65bcbf105b taskset: fix cpuset list parser
taskset hangs when executed with badly formatted cpuset list, for
example:

	 $ taskset -c 0--1 true

The current cpuset list parser is pretty weak as based on scanf()
without strings verification ("-1" as input for "%u" returns
unexpected number). It seems faster and better to use strtoul() and
isdigit().

Addresses: https://github.com/karelzak/util-linux/issues/77
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-20 13:12:25 +01:00
Karel Zak 06c141a99a lscpu: (man) tiny changes 2019-03-19 17:00:01 +01:00
Karel Zak a44cd89128 lscpu: fix excl[] array order
It (rows and columns) must be in ASCII order.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:56:28 +01:00
Karel Zak 0a31a242cb lscpu: fix and document --output-all
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:47:55 +01:00
Karel Zak 2ec00a10b2 lscpu: define libsmartcols flags for -e
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:40:51 +01:00
Karel Zak 4161da7bb0 lscpu: fix --caches order
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:24:54 +01:00
Karel Zak 9261d0a119 lscpu: (man) make SYNOPSIS compatible with another utils
In this case is really no reason to duplicate all options in SYNOPSIS.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 14:30:09 +01:00
Karel Zak 2011528bce lscpu: add --bytes
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 14:29:40 +01:00
Karel Zak 0e86bc8406 lscpu: add --caches
$ lscpu -C
NAME ONE-SIZE ALL-SIZE WAYS TYPE        LEVEL
L3         8M       8M   16 Unified         3
L2       256K       1M    8 Unified         2
L1i       32K     128K    8 Instruction     1
L1d       32K     128K    8 Data            1

The patch also updates extra caches (s390) output in lsblk summary to
be compatible with output about normal caches.

Addresses: https://github.com/karelzak/util-linux/issues/663
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 14:11:20 +01:00
Karel Zak 357dd756d1 lib/path: remove extra semi-colons
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 13:57:05 +01:00
Karel Zak cc07239d5c lscpu: rename macros and functions
We need to differentiate between output about CPUs and another stuff
(caches in future). Let's make it more obvious in code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 13:57:05 +01:00
Karel Zak 1b4b184cc8 tests: update lscpu output
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 13:56:26 +01:00
Karel Zak e5f721132e lscpu: report more usable cache sizes
The current version reports cache size as reported by /sys, it means
real size of the one piece of the cache. This way provides minimal
overview about all system as the cache is often shared between CPUs.

It seems better to report all size of the caches in the summary
output. It also does not make sense to report sizes per core (or
socket) as CPU topology may be pretty complicated.

The final solution (not implemented yet) will be to have --list-caches
where we can report all details like all-size, item-size, per-core size,
ways, type, etc.

Addresses: https://github.com/karelzak/util-linux/issues/663
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 11:09:02 +01:00
Karel Zak fb3761809f lsblk: force tree on --json --tree independently on used columns
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-18 16:58:41 +01:00
Karel Zak 58bfb7e927 docs: TODO lscpu --list-caches
Addresses: https://github.com/karelzak/util-linux/issues/663
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-18 14:14:09 +01:00
Karel Zak 16ca05511b lscpu: add 'Frequency boost'
Show turbo boost status on platforms where is available a file
/sys/devices/system/cpu/cpufreq/boost.

Addresses: https://github.com/karelzak/util-linux/issues/755
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-15 13:37:51 +01:00
Karel Zak a8f103f079 Merge branch 'swapon-btrfs' of https://github.com/marcosfrm/util-linux
* 'swapon-btrfs' of https://github.com/marcosfrm/util-linux:
  swapon.8: mention btrfs(5)
2019-03-11 12:09:30 +01:00
Karel Zak 9bfff042d0 Merge branch 'setterm' of https://github.com/jwilk-forks/util-linux
* 'setterm' of https://github.com/jwilk-forks/util-linux:
  setterm: fix --hbcolor description
2019-03-11 12:06:38 +01:00
Karel Zak 5bf5752e28 blkid: (man) cleanup return code section
Addresses: https://github.com/karelzak/util-linux/issues/764
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-11 12:02:31 +01:00
Marcos Mello 63391d7579 swapon.8: mention btrfs(5)
See:

5c880c82c2
2019-03-11 07:30:35 -03:00
Jakub Wilk f28985ffc3 setterm: fix --hbcolor description
--hbcolor is for half-bright characters, which is sort of opposite of
bold.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2019-03-08 21:27:59 +01:00
Karel Zak ffe147fadd Merge branch 'setterm' of https://github.com/jwilk-forks/util-linux
* 'setterm' of https://github.com/jwilk-forks/util-linux:
  setterm: update comments about -ulcolor/-hbcolor syntax
  setterm: fix bright colors for --ulcolor/--hbcolor
  setterm: disallow "default" for --ulcolor/--hbcolor
2019-03-08 13:15:29 +01:00
Karel Zak 9847106585 Merge branch 'patch-2' of https://github.com/MeggyCal/util-linux
* 'patch-2' of https://github.com/MeggyCal/util-linux:
  Update mount.8
2019-03-08 12:33:10 +01:00
Karel Zak f91c21cc7e mkswap: be more explicit about maximal number of pages
Addresses: https://github.com/karelzak/util-linux/pull/766
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-08 12:14:19 +01:00
Tim Hildering 9d5eb4c464 libmount: improve fs referencing in tables
* Added member 'struct libmnt_table *tab' to libmnt_fs structure.
* Added 'mnt_fs_get_table()'.
* Removed overhead from 'mnt_table_{insert,move,remove}_fs().
* Added check to 'mnt_table_set_iter()' that entry is member of table.

[kzak@redhat.com: - add to libmount.sys
                  - add to docs
                  - cleanup commit message
                  - set fs->tab = NULL before mnt_unref_fs() in mnt_table_remove_fs()]

Signed-off-by: Tim Hildering <hilderingt@posteo.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-08 11:40:20 +01:00
Jakub Wilk bec23f0bf2 setterm: update comments about -ulcolor/-hbcolor syntax
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2019-03-07 22:11:46 +01:00
Jakub Wilk 3d886e86f6 setterm: fix bright colors for --ulcolor/--hbcolor
The "bright" keyword was parsed, but it didn't actually affect the color
that was set.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2019-03-07 22:11:46 +01:00
Jakub Wilk c1b4cf105d setterm: disallow "default" for --ulcolor/--hbcolor
Passing "default" to --ulcolor or --hbcolor worked, but it set the color to
bright red. This was not a documented syntax, so let's forbid it.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2019-03-07 22:11:38 +01:00
MeggyCal 248be5c98d
Update mount.8
xfs is widely supported today
2019-03-07 17:24:22 +01:00
Karel Zak 64a87be1a4 su: add note about ECHO on --pty
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-06 13:12:23 +01:00
Karel Zak 5932ef81de su: be sensitive to another SIGCHLD ssi_codes
See the same issue for script: 27afe50168

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-06 12:02:30 +01:00
Karel Zak 282ca3d87b su: fix --pty terminal initialization
* use proper winsize rather than uninitialized variable (Oops...)

* set the current terminal to the raw mode

* disable ECHO for non-terminal execution to be compatible with
  non-pty output

Addresses: https://github.com/karelzak/util-linux/issues/767
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-06 12:01:18 +01:00
Karel Zak 2648be66d2 tests: add missing ts_check_test_command call
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-05 13:56:33 +01:00
Karel Zak 884019e2ea build-sys: add check-programs make target
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-05 11:38:44 +01:00
Karel Zak 7c90efa384 tests: add --noskip-commands
The default is SKIP missing commands on --use-system-commands, but
with --noskip-commands the test will FAIL.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-05 11:06:41 +01:00
Karel Zak bb872a239c tests: add missing TS_CMD_UMOUNT check
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 17:32:03 +01:00
Karel Zak 2fadcded53 tests: (kill) do not use shell build-in
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 17:28:15 +01:00
Karel Zak 43b4a4d3c7 tests: add --use-system-commands
This change allows to use commands from $PATH rather than from
$top_builddir. There two basic use cases:

* check differences between installed and git version
  run.sh --use-system-command --show-diff

* check system binaries by upstream tests (for example tests from
  src.rpm package)

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 17:14:12 +01:00
Karel Zak 19e00ec9e9 tests: add missing ts_check_test_command calls
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 16:42:30 +01:00
Karel Zak 0b07e2682f su/runuser: don't mark --pty as experimental, add it to runuser.1 too
* let's assume that --pty is stable enough that we do not have to remove it ;-)

* add --pty to the runuser.1 man page

Addresses: https://github.com/karelzak/util-linux/issues/760
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 13:13:30 +01:00
Karel Zak b6c2665e4d Merge branch 'mps_losetup_has_device_inline' of https://github.com/marcosps/util-linux
* 'mps_losetup_has_device_inline' of https://github.com/marcosps/util-linux:
  lib/loopdev.c: Inline loopcxt_has_device
2019-03-04 11:48:20 +01:00
Karel Zak 3cd5e33b5c Merge branch 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linux
* 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linux:
  test: Adding AMD EPYC 7451 24-Core Processor
2019-03-04 11:46:16 +01:00
Patrick Steinhardt 72aa1db70c last: do not use non-standard __UT_NAMESIZE
In commit b22332dd4 (last: fix wtmp user name buffer overflow
[asan], 2019-01-13), we started to make sure that the `ut_user`
field of the `utmpx` struct is always NUL-terminated. The
implementation makes use of the `__UT_NAMESIZE` define to
determine the position of the last character in that array. The
problem is that this is a non-standard define that is not
necessarily available on non-glibc platforms.

As there is no standardized define, we should just use `sizeof`.
This fixes compilation on musl libc based systems.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
2019-03-04 11:38:28 +01:00