Commit Graph

2843 Commits

Author SHA1 Message Date
Karel Zak d0aeb4d2c0 mount.8: don't consider additional mounts as experimental
This is bug, we have "EXPERIMENTAL" flag in the man page since v2.23.

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-16 13:00:18 +02:00
panchenbo 75882dea1a lscpu:Add Phytium FT-2000+ & S2500 support 2021-08-16 12:59:52 +02:00
panchenbo 6dde514b2a lscpu:Add Phytium aarch64 cpupart 2021-08-16 12:59:42 +02:00
Karel Zak a5c6ab54e6 lscpu: fix compilation against librtas
Fixes: https://github.com/karelzak/util-linux/issues/1406
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-09 11:54:38 +02:00
Karel Zak f6dd7b20cd prlimit: fix compiler warning [-Wmaybe-uninitialized]
sys-utils/prlimit.c:467:16: warning: 'hard' may be used uninitialized in this function [-Wmaybe-uninitialized]
  lim->rlim_max = hard;
  ~~~~~~~~~~~~~~^~~~~~
sys-utils/prlimit.c:456:15: note: 'hard' was declared here
  rlim_t soft, hard;
               ^~~~
sys-utils/prlimit.c:466:16: warning: 'soft' may be used uninitialized in this function [-Wmaybe-uninitialized]
  lim->rlim_cur = soft;
  ~~~~~~~~~~~~~~^~~~~~
sys-utils/prlimit.c:456:9: note: 'soft' was declared here
  rlim_t soft, hard;
         ^~~~

References: https://github.com/karelzak/util-linux/issues/1406
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-09 11:54:07 +02:00
Karel Zak ebd4749115 lscpu: fix NULL dereference
Fixes: https://github.com/karelzak/util-linux/issues/1401
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-30 14:44:32 +02:00
Karel Zak 86d5de52d4 sys-utils/ipcutils: be careful when call calloc() for uint64 nmembs
Fix: https://github.com/karelzak/util-linux/issues/1395
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-29 11:57:17 +02:00
Luca Boccassi 6a7194ea23 mount: fix roothash signature extension in manpage
The PKCS7 RFC recommends to use .p7s for detached signatures file extensions,
so use that in the example.

https://datatracker.ietf.org/doc/html/rfc5751#section-3.2.1
2021-07-20 11:55:32 +02:00
Karel Zak 19dd7a1e30 lscpu: don't use DMI if executed with --sysroot
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:54:48 +02:00
Karel Zak 9ada40d3cc fstrim: clean return code on --quiet-unsupported
This feature is already supported for -a and -A. Let's support it also
when FS specified on command line.

Addresses: https://github.com/systemd/mkosi/pull/721
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:54:03 +02:00
Karel Zak 28941d202a misc: improve string to number conversions
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:51:02 +02:00
Karel Zak cb75cf88b8 lscpu: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:50:52 +02:00
Karel Zak 878307e960 swapon: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:49:57 +02:00
Karel Zak e4aad0a9c4 ipcs: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:49:57 +02:00
Karel Zak 0ea3e2f0ed eject: do not use atoi()
* remove unnecessary strtok() use
* remove atoi use()

Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:49:57 +02:00
Karel Zak aeba558136 readprofile: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak 8803c8d4ab lsmem: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak 096487c616 lscpu: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Karel Zak 8335261c3d hwclock: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Karel Zak b6cd420e03 ipcs: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Thiébaud Weksteen 864578ded7 mount.8.adoc: Remove context options exclusion
The exclusivity between the {fscontext, defcontext} and context options
was removed in kernel 2.6.25[1]. No specific verification on these
options is done in mount(8)[2].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9180a57a9ab2d5525faf8815a332364ee9e89b7
[2] https://github.com/karelzak/util-linux/blob/master/libmount/src/context_mount.c#L202
2021-07-20 11:33:27 +02:00
Karel Zak 86328e78ea include/c: add drop_permissions(), consolidate UID/GID reset
Fixes: https://github.com/karelzak/util-linux/issues/1354
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:31:43 +02:00
Karel Zak 155b79d38e dmesg: remove condition [lgtm scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:31:43 +02:00
Karel Zak 7b18166aa3 ldattach: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:30:00 +02:00
Karel Zak b2bd06d9ca hwclock: fix ul_path_scanf() use
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:29:01 +02:00
Karel Zak 856ec50de5 eject: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak ed03caf2c6 mount.8: fix overlayfs nfs_export= indention
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:26:30 +02:00
Christian Bartolomäus b81a870767 Fix some brackets in synopses 2021-07-20 11:25:34 +02:00
Tj c22bb73d3a mount: man-page; add all overlayfs options
The section in man (8) mount for overlay is missing nine options which
aren't documented elsewhere either and are useful features to be aware
of and use.

Fixes #1350.
2021-07-20 11:25:13 +02:00
Karel Zak 612913cda5 lib/loopdev: perform retry on EAGAIN
Suggested-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:14:17 +02:00
Topi Miettinen b1e37433bb mount.8.adoc: document SELinux use of nosuid mount flag
Using mount flag `nosuid` also affects SELinux domain transitions but
this has not been documented well.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2021-07-20 11:13:25 +02:00
Platon Pronko 4b9d512c6f dmesg: fix indentation in man page
Double-semicolon at the end of the option line results in description
being indented extra tab to the right. Replacing them with double-colons
allows all options to be displayed at the same indent level.
2021-07-20 11:13:14 +02:00
Karel Zak a8deea07a7 hwclock: close adjtime on write error [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:13:02 +02:00
Karel Zak bcb6ccf819 dmesg: fix possible memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:13:02 +02:00
Nicolai Dagestad 97660cb42a rfkill: Set scols table name to make the json output valid
[kzak@redhat.com: - s/rfkill/rfkilldevices/]

Fixes: https://github.com/karelzak/util-linux/issues/1339
Signed-off-by: Nicolai Dagestad <nicolai@dagestad.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:08:23 +02:00
Georgy Yakovlev fb87dcc80e lscpu: fix build on powerpc
fails with error: label at end of compound statement
and fix typo as bonus.

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
2021-07-20 10:57:22 +02:00
Ville Skyttä ecec8f1f90 lscpu: fix NVIDIA ARM hw implementer spelling case
Ref respective vendor sites.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-31 12:15:48 +02:00
Ville Skyttä d44a83c1f9 lscpu: recognize more ARM implementers
Add just the implementer string, no parts yet.

Refs https://developer.arm.com/documentation/ddi0595/2021-03/AArch64-Registers/MIDR-EL1--Main-ID-Register
Refs b90e90f40b/arch/arm64/include/asm/cputype.h (L54)

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2021-05-31 12:14:34 +02:00
Karel Zak b97e2145fa po: add xgettext hint for non-c-format string
Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-27 10:39:58 +02:00
Karel Zak 0a0af6161b lscpu: cleanup tab vs. space
Do not mix tab and space in structs initializations.

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-26 11:54:47 +02:00
Bader Zaidan f2aadc1160 lscpu: Replace space with tabs
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-26 11:47:33 +02:00
Karel Zak aa049eabb3 lscpu: add MHZ to the -e output
Addresses: https://github.com/karelzak/util-linux/issues/1314
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-23 23:52:00 +02:00
Zbigniew Jędrzejewski-Szmek cacd3e7685 fstrim: do not start the timer in initrd
I'm working on building initramfs images directly from normal
packages, which means that the pristine system rpms should behave
correctly as much as possible also in the initrd. There usually isn't
enough time for the timer to actually fire, but starting it gives a
line on the console and generally looks confusing and sloppy. So let's
skip the timer if it ever ends up being enabled in the initrd.

Checking for /etc/initrd-release is the standard condition that
systemd's initrd units use.
2021-05-21 10:45:35 +02:00
Karel Zak 3e8403522c fstrim: fix paths comparison
Fix: https://github.com/karelzak/util-linux/issues/1312
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-20 09:29:34 +02:00
Karel Zak e304441936 blkdiscard: do not probe for signatures on --force
The command-line option --force is defined as "disable all checks",
but the current code does not follow this idea. We need a way how to
disable read from the device (for example for dm-integrity devices).

Fixes: https://github.com/karelzak/util-linux/issues/1308
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-13 10:34:14 +02:00
Christian Hesse e08e3d587c fix whitespace issue in ducumentation
This removes trailing whitespaces and fixes minor issues.
2021-05-10 15:53:50 +02:00
Karel Zak 58739eb0a7 build-sys: fix libblkid dependence
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-10 11:24:24 +02:00
Karel Zak b6464f8dc5 blkdiscard: fix compilation without libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-07 20:38:26 +02:00
Johan Herland 9b657529cc
unshare: Fix error message when setting proc mount propagation
The mount() command associated with this error message is not about
unmounting the proc fs, but rather about changing the propagation
of mount events for the proc fs. Rewrite the error message to
reflect this.
2021-05-07 00:53:29 +02:00
Karel Zak 185bc3a832 rfkill: make RFKILL_EVENT_SIZE_V1 use more portable
The old linux/rfkill.h uses "int", new versions use sizeof() for the
macro ...

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 17:10:46 +02:00