Commit Graph

14338 Commits

Author SHA1 Message Date
Karel Zak c70940778d po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 11:49:28 +02:00
Karel Zak 1aa0f1abf4 lib/strutils: use directly err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 11:45:55 +02:00
Božidar Putanec ccbeabfa05 po: update hr.po (from translationproject.org) 2020-06-09 11:35:01 +02:00
Karel Zak 19a353947d logindefs: use xalloc.h, code cleanup
- remove else-after-return
- use else-if
- use xalloc stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 11:31:42 +02:00
Karel Zak 0c960dd8b9 lib/strutils: remove unnecessary include
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 10:56:28 +02:00
Karel Zak 01977c3847 tests: add STATIC binaries to build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 10:55:20 +02:00
Karel Zak 330b09976f build-sys: remove redundard includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 10:53:14 +02:00
Karel Zak 487b55db54 libblkid: (docs) document new function
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 10:51:37 +02:00
Karel Zak 967b8c2579 libfdisk: (docs) document new functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 10:50:42 +02:00
Marcel Waldvogel 07e6f72822 mount: Update man page Synopsis
Document
- `-t` when listing mounts
- `--bind`, `--rbind`, and `--move`
- `--make-*`
- Mountpoints need not only be directories

[kzak@redhat.com: - cleanup syntax,
		  - use all complete --make-* list]

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-08 14:30:03 +02:00
Karel Zak 1376cdeaf2 tests: update build-sys tests
- remove libasan from results
- link libcryptsetup (due to verity support in libmount)
- add lsiqr
- add irqtop

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-08 13:29:33 +02:00
Karel Zak 5868026e2c build-sys: fix irqtop compilation with -lslang
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-08 13:18:20 +02:00
Karel Zak f7c875d4a9 tests: don't use ASAN in build tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-08 11:45:09 +02:00
Karel Zak c61470c7c0 build-sys: make lsirq and irqtop optional
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-08 11:33:00 +02:00
Karel Zak ac26b19ba6 lscpu: cleanup caches code
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-08 10:05:14 +02:00
Sumanth Korikkar 318542e060 lscpu: Add shared cached info for s390 lscpu -C
The shared cache info for s390 can be found in /proc/cpuinfo.
lscpu without any options already processes this info. Fix this
in lscpu -C and provide detailed stat.

Test for s390:
./lscpu -C
NAME ONE-SIZE ALL-SIZE WAYS TYPE        LEVEL  SETS PHY-LINE COHERENCY-SIZE
L1d      128K     256K    8 Data            1    64                     256
L1i      128K     256K    8 Instruction     1    64                     256
L2d        4M       8M    8 Data            2  2048                     256
L2i        2M       4M    8 Instruction     2  1024                     256
L3       128M            32 Unified         3 16384                     256
L4       672M            42 Unified         4 65536                     256

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
2020-06-08 09:53:41 +02:00
Stanislav Brabec 9147d2ad8a blockdev: Don't fail on missing start sector
It causes
 # blockdev --report" error:
 blockdev: /dev/dm-9: failed to read partition start from sysfs: No such file or directory

There is no reliable way to detect a geometry in this case. Report N/A
instead.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Martin Wilck <martin.wilck@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-05 10:04:21 +02:00
Karel Zak 43d2ce3b44 blkzone: remove unnecessary initializations
C compiler is smart enough to follow C standards

 C11: 6.7.8 Initialization

 All subobjects that are not initialized explicitly shall be
 initialized implicitly the same as objects that have static storage
 duration.

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-05 09:18:08 +02:00
Shin'ichiro Kawasaki 6e103c7690 blkzone: Add --force option
Commit 7a2602f629 ("blkzone: deny destructive ioctls on busy blockdev")
introduced exclusive mode to open block devices to submit zone management
ioctls. This avoids unintended status change of block devices used by the
system. However, it makes blkzone less usable for testing. For example,
the test case zbd/007 of blktests utilizes blkzone to reset zones of
block devices mapped to dm-linear devices. After the commit, the test
case fails with EBUSY error at blkzone reset, since the system uses the
reset target block device to map to the dm-linear device.

To allow blkzone to change status of zoned block devices used by the
system with intention, introduce --force option. With this option, block
devices are opened without exclusive mode.

Also fix too many periods in man page of --verbose option.

[kzak@redhat.com: - tiny cosmetic changes]

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-05 09:15:32 +02:00
Konstantin Khlebnikov 9bf622dad9 dmesg: adjust timestamps according to suspended time
Timestamps in kernel log comes from monotonic clocksource which does not
tick when system suspended. Suspended time easily sums into hours and days
rendering human readable timestamps in dmesg useless.

Adjusting timestamps accouring to current delta between boottime and
monotonic clocksources produces accurate timestamps for messages printed
since last resume. Which are supposed to be most interesting.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
2020-06-04 10:57:36 +02:00
Michael Kerrisk (man-pages) 4d4f56baad Manual pages: unshare.1: clarify that --pid=<file> requires --fork
Attempting to create a persistent PID namespace with --pid=<file>
will result in an error if --fork is not also specified. Let's
warn people about that, so they don't get puzzled.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-03 17:05:37 +02:00
Michael Kerrisk (man-pages) 48994386a1 Manual pages: unshare.1: clarify description and example for --mount=<path>
The existing text is not quite accurate, and I recently injected an
error into the EXAMPLES. This patch fixes both issues.

The text in DESCRIPTION incorrectly states that the propagation type of
the parent mount must be "private". This is not accurate.  Rather, the
propagation type must be something *other than "shared"* (i.e.,
"private", "slave", or "unbindable").

In the EXAMPLES section, I added text that implies that if the
propagation type of the parent mount is "shared", then the child mount
created by --mount=<path> might propagate to another namespace.
Rather, in this situation, an error would result. Clarify that.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-06-03 17:03:56 +02:00
Karel Zak b3391f3ac7 libmount: add support for ID=
This patch add support for a new tag. The tag is based on udev block
device ID (see /dev/disk/by-id). The usual use-case is to use
WWN for this purpose, for example

  # mount ID=wwn-0x50026b724b09a1ff /mnt

Note that ID is not strictly defined and udevd generates various IDs
also for HW where WWN is undefined. This is reason why introduce ID=
seems better and more generic than more restrictive WWN=.

Addresses: https://github.com/karelzak/util-linux/issues/1008
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-03 16:53:00 +02:00
Karel Zak 72bc0dd27c mount: (man) cleanup devices identifiers section
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-01 14:53:47 +02:00
Karel Zak a437692943 login: cleanup -f in usage() and comments
Let's remove unnecessary comment and "second authentication" from
usage().

Addresses: https://github.com/karelzak/util-linux/issues/1053
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-01 10:33:29 +02:00
Konstantin Khlebnikov d7881b0ed5 dmesg: add --follow-new
Option --follow-new (-W) works the same as --follow (-w) but initially
seeks to the end of kernel ring buffer, so it prints only new messages.
Useful for capturing kernel messages during actions without past log.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
2020-06-01 09:55:49 +02:00
Karel Zak f0833edc12 login: fix -f description in the man-page
Addresses: https://github.com/karelzak/util-linux/issues/1053
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-29 14:50:36 +02:00
Michael Kerrisk (man-pages) 96e47ad0cb Manual pages: mount.8: Miscellaneous wording, grammar, and formatting fixes
Most of these are "obviously correct":
- formatting fixes
- improved English wordings
- add missing articles ("a", "the")
- a few spelling fixes
- a few "obvious" corrections to the text

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 14:31:47 +02:00
Michael Kerrisk (man-pages) 1538f6f636 Manual pages: wording fix: "another" ==> "other"
In several pages, there is a consistent wording problem: "another"
where "other" should be used. This wording problem can be
surprisingly confusing for native speakers, especially those
unaware that in some other languages, "another" and "other" can be
expressed with the same word.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 14:31:47 +02:00
Karel Zak f8ad710f6c build-sys: add missing LDADD to blkid test
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-29 09:54:48 +02:00
Michael Kerrisk (man-pages) 79eab6383f Manual pages: umount.8: use "filesystem" consistently
Currently, this page has a mix of "filesystem" and file system",
with the former being predominant.  Let's settle on one.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) b3222042a1 Manual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro
Add a table listing other manual pages that describe mount options
of some widely used filesystems. Additionally, rewrite the remaining
text to be a bit easier to read.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) 4330d74d96 Manual pages: mount.8: Typo fix (remove an accidental paragraph break)
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) f95c9776c2 Manual pages: mount.8: SEE ALSO: add some obvious references
And correct sort order for "umount(8)" entry.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) cfd6b4dc1d Manual pages: mount.8, umount.8: Consistently format pathnames with italic
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) 2a425c02e4 Manual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace"
There are various references to "namespaces" when it would be
clearer to say "mount namespaces". Also, add references to the
mount_namespaces(7) manual page.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) 4281542466 Manual pages: setpriv.1: Minor formatting and typo fixes
These seem all "obviously correct", so I'm rolling them up
into one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) 583e50dbd0 Manual pages: unshare.1: typo fix
(Introduced in one of my earlier commits)

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Michael Kerrisk (man-pages) a8176639da Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
The text describing the persistent mount namespace example
is rather confused. Explain more clearly the purpose of making
the parent directory a bind mount with private propagation.
Also make a few other wording improvements.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 09:44:58 +02:00
Helge Deller 2261cfdc26 setarch: fix stderr handling in uname26 tests
A while ago stdout and stderr have been split in these testcases, but
"FATAL: kernel too old" is actually treated as an "okay" output. However
this FATAL ends up on stderr, so when it happens, it is not seen in
the captured stdout.

Fix this by merging stdout/stderr in these cases once again.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961639
Fixes: cbf858aa08
2020-05-28 15:59:13 +02:00
Michael Kerrisk (man-pages) 3bc92f313a Manual pages: rename EXAMPLE section to EXAMPLES
Earlier, I patched various pages to consistently use EXAMPLE as a
section heading, rather than EXAMPLES.  (At that time, both headings
occurred in util-linux, with roughly equal frequency.)

Since then, I've observed that EXAMPLES is the more common usage
across a large corpus of manual pages. So, in Linux the man-pages
project, I switched to using EXAMPLES also. This patch makes the same
change for util-linux.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-28 14:51:54 +02:00
Michael Kerrisk (man-pages) 79a0cc9d02 Man pages: ipcmk.1, ipcs.1, lsipc.1: explicitly mention "System V"
Explicitly mention "System V" in the description, so that readers do not
get confused with the POSIX IPC mechanisms.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-28 14:51:53 +02:00
Michael Kerrisk (man-pages) fdd6a44f4c Manual pages: ipcmk.1, ipcrm.1, ipcs.1, lsipc.1: SEE ALSO: add sysvipc(7)
These commands all relate to System V IPC, so point the reader
at the relevant Section 7 page provided by the Linux man-pages
project.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-28 14:51:53 +02:00
Michael Kerrisk (man-pages) a374630f76 Manual pages: kill.1: improve the description of the --timout option
The text describing this option is a little hard to understand.
Improve it.

Cc: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-28 14:51:52 +02:00
Michael Kerrisk (man-pages) 226c38d447 Manual pages: kill.1: various language, spelling, and formatting fixes
These seem all "obviously correct", so I'm rolling them up into
one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-28 14:51:51 +02:00
Karel Zak e4253d3ca4 swapoff: do not use 1 exist status at all
The make sure we are not in collision with old versions.

Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-28 12:51:26 +02:00
Karel Zak ecfa4dad6f swapoff: cleanup EXIT STATUS
The current code hides details about reason why swapoff(8) and swapoff(2) failed. For example
ENOMEM from swapoff(2) is important as it indicates OOM.

The patch also clean ups --all return codes to be more compatible for
example with [u]mount --all, etc.

Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-27 18:58:30 +02:00
Karel Zak c7fce443b1 libfdisk: (dos) be more explicit in fdisk_verify_disklabel() output
Let's print number of detected errors or "No errors detected." for
MBR. We already use the same for GPT.

The patch also modifies fdisk_verify_disklabel() return code to inform
caller about number of issues.

Addresses: https://github.com/karelzak/util-linux/issues/1051
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-27 17:49:26 +02:00
Karel Zak 9cd88771ef fdisk: add --lock and LOCK_BLOCK_DEVICE
Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-27 17:00:41 +02:00
Karel Zak 921ceaca31 wipefs: add --lock and LOCK_BLOCK_DEVICE
Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-27 17:00:08 +02:00