]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
2 years agoChange ThunderX3T110 core name to ThunderX3-T110
ThomasKaiser [Mon, 23 Jan 2023 12:15:16 +0000 (13:15 +0100)] 
Change ThunderX3T110 core name to ThunderX3-T110

(for consistency reasons)

2 years agoAdd missing Exynos M5 core
ThomasKaiser [Sun, 22 Jan 2023 17:18:44 +0000 (18:18 +0100)] 
Add missing Exynos M5 core

https://github.com/Dr-Noob/cpufetch/blob/master/src/arm/uarch.c#L310

2 years agoAdd missing Cavium cores
ThomasKaiser [Sun, 22 Jan 2023 11:45:08 +0000 (12:45 +0100)] 
Add missing Cavium cores

https://github.com/ThomasKaiser/sbc-bench/commit/37332238c0a8b7c1555dca9d18a7c98362564416#diff-fdfd2a032c64d6e9ba92a3197cad6b26573c7094433d74efa4ae80f44f65aa99

2 years agoAdd missing Ampere cores
ThomasKaiser [Sun, 22 Jan 2023 11:41:36 +0000 (12:41 +0100)] 
Add missing Ampere cores

https://github.com/ThomasKaiser/sbc-bench/commit/37332238c0a8b7c1555dca9d18a7c98362564416#diff-fdfd2a032c64d6e9ba92a3197cad6b26573c7094433d74efa4ae80f44f65aa99

2 years agoAdd missing ARM-cores
ThomasKaiser [Sun, 22 Jan 2023 11:37:33 +0000 (12:37 +0100)] 
Add missing ARM-cores

https://github.com/ThomasKaiser/sbc-bench/commit/37332238c0a8b7c1555dca9d18a7c98362564416#diff-fdfd2a032c64d6e9ba92a3197cad6b26573c7094433d74efa4ae80f44f65aa99

2 years agoAdd HiSilicon's 0x48/0xd40 Cortex-A76 variant.
ThomasKaiser [Sun, 22 Jan 2023 09:36:01 +0000 (10:36 +0100)] 
Add HiSilicon's 0x48/0xd40 Cortex-A76 variant.

Both Kirin 980 and Kirin 810 feature big cores with 0x48/0xd40 ID though they are marketed/documented as Cortex-A76 by HiSilicon themselves. Kirin 980 shows a r1p0 stepping while newer 810 has r3p0.

  * https://github.com/deater/test_proc/blob/master/arm64/arm64.v8.0x41.0xd05.0x48.0xd40.huawei_mate_20#L37-L71
  * https://github.com/termux/proot/issues/190#issuecomment-927013509

2 years agoAdd exynos-m4
ThomasKaiser [Sat, 21 Jan 2023 18:54:27 +0000 (19:54 +0100)] 
Add exynos-m4

https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-9820.cpuinfo

2 years agoAdd 53/002:Samsung Exynos-m3
ThomasKaiser [Sat, 21 Jan 2023 17:03:11 +0000 (18:03 +0100)] 
Add 53/002:Samsung Exynos-m3

ID 002 for the Exynos-m3 core seems weird since Exynos-m1 had 001 but Samsung's Mongoose line differs only by stepping between M1 and M2

  * Mongoose 1, for example [Exynos 8890](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-8890-highperformance.cpuinfo): Exynos-m1 / r1p1
  * Mongoose 2, for example [Exynos 8895](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-8895.cpuinfo): Exynos-m1 / r4p0
  * Mongoose 3, for example [Exynos 9810](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-9810.cpuinfo): Exynos-m3 / r1p0

2 years agolsfd: remove strcpy(), keep things based on sizeof()
Karel Zak [Fri, 20 Jan 2023 14:20:55 +0000 (15:20 +0100)] 
lsfd: remove strcpy(), keep things based on sizeof()

* use safe xstrncpy() rather than strcpy()
* use sizeof() for static buffers rather than macro with real size
  (this solution is more robust for future code changes)
* use xcalloc() to zeroize allocated memory

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoinclude/c: add sizeof_member()
Karel Zak [Fri, 20 Jan 2023 14:19:52 +0000 (15:19 +0100)] 
include/c: add sizeof_member()

This macro returns size of struct member.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibblkid: (bcachefs) verify checksum before set probing result
Karel Zak [Fri, 20 Jan 2023 11:45:10 +0000 (12:45 +0100)] 
libblkid: (bcachefs) verify checksum before set probing result

* merge probe_bcachefs_full_sb() in to probe_bcachefs()

* define variables at the beginning of the code block

* cosmetic code cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibblkid: bcachefs: add xxhash checksum support
Thomas Weißschuh [Fri, 18 Nov 2022 17:42:01 +0000 (18:42 +0100)] 
libblkid: bcachefs: add xxhash checksum support

2 years agolibblkid: bcachefs: add crc64 checksum support
Thomas Weißschuh [Tue, 13 Sep 2022 07:50:51 +0000 (09:50 +0200)] 
libblkid: bcachefs: add crc64 checksum support

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: bcachefs: add crc32 checksum support
Thomas Weißschuh [Mon, 19 Apr 2021 22:02:07 +0000 (00:02 +0200)] 
libblkid: bcachefs: add crc32 checksum support

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: bcachefs: validate device fields
Thomas Weißschuh [Sun, 27 Nov 2022 19:47:04 +0000 (20:47 +0100)] 
libblkid: bcachefs: validate device fields

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: bcachefs: probe UUID_SUB
Thomas Weißschuh [Mon, 12 Apr 2021 12:05:00 +0000 (14:05 +0200)] 
libblkid: bcachefs: probe UUID_SUB

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: add bcachefs support
Thomas Weißschuh [Mon, 12 Apr 2021 12:01:14 +0000 (14:01 +0200)] 
libblkid: add bcachefs support

https://bcachefs.org/

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoc.h: fix compiler warning [-Werror=shift-count-overflow]
Karel Zak [Tue, 17 Jan 2023 15:36:13 +0000 (16:36 +0100)] 
c.h: fix compiler warning [-Werror=shift-count-overflow]

It's probably typo in the original path (too many brackets:-)). Let's
be explicit about the types used in the calculation. '1 << n' means
the left shift is on 'int', but we need '(t)1 << n'.

Addresses: e53463ea40c58a6f84a597966ac69be9be72cd7d
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'blkdev' of https://github.com/ferivoz/util-linux
Karel Zak [Tue, 17 Jan 2023 15:15:11 +0000 (16:15 +0100)] 
Merge branch 'blkdev' of https://github.com/ferivoz/util-linux

* 'blkdev' of https://github.com/ferivoz/util-linux:
  lib/blkdev: use off_t for max values
  lib/blkdev: set errno in more cases
  lib/blkdev: handle interrupted read call

2 years agoswapon: add --fstab command line option
Karel Zak [Mon, 16 Jan 2023 12:47:36 +0000 (13:47 +0100)] 
swapon: add --fstab command line option

Let's add --fstab mount option for compatibility with mount(8).

Addresses: https://github.com/util-linux/util-linux/issues/2017
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolib/blkdev: use off_t for max values
Samanta Navarro [Fri, 13 Jan 2023 11:52:36 +0000 (11:52 +0000)] 
lib/blkdev: use off_t for max values

The off_t datatype is signed. Use it for high and low boundaries as
well to support also very large block devices close to its limits.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2 years agolib/blkdev: set errno in more cases
Samanta Navarro [Fri, 13 Jan 2023 11:51:52 +0000 (11:51 +0000)] 
lib/blkdev: set errno in more cases

Applications evaluate errno in case of a -1 return value. Examples
within util-linux are fsck.cramfs and mkfs.minix. Set errno more often
to offer reasonable error codes to the application and user.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2 years agolib/blkdev: handle interrupted read call
Samanta Navarro [Fri, 13 Jan 2023 11:50:40 +0000 (11:50 +0000)] 
lib/blkdev: handle interrupted read call

The read call may fail if it is interrupted by a signal. Do not assume
that we have reached the end of the underlying block device because of
this. Use read_all which retries in these cases.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2 years agoc.h: really avoid undefined behavior in SINT_MAX
Thomas Weißschuh [Sat, 14 Jan 2023 22:16:28 +0000 (22:16 +0000)] 
c.h: really avoid undefined behavior in SINT_MAX

The previous fix in #2013 still invoked undefined behavior by shifting
into the sign-bit.

Now we have a correct, albeit unwieldy solution that avoids undefined
behavior.
Instead of bit fiddling it uses plain addition and substraction.

We are looking for (in LaTeX notation):
  2^(n - 1) - 1
= 2 * 2^(n - 2) - 1
= 2^(n - 2) + 2^(n - 2) - 1
= 2^(n - 2) - 1 + 2^(n - 2)

2 years agoMerge branch 'mkswap' of https://github.com/ferivoz/util-linux
Karel Zak [Fri, 13 Jan 2023 12:35:02 +0000 (13:35 +0100)] 
Merge branch 'mkswap' of https://github.com/ferivoz/util-linux

* 'mkswap' of https://github.com/ferivoz/util-linux:
  mkswap: do not use uninitialized stack value

2 years agomkswap: do not use uninitialized stack value
Samanta Navarro [Fri, 13 Jan 2023 11:53:41 +0000 (11:53 +0000)] 
mkswap: do not use uninitialized stack value

If blkdev_get_size fails, then size is not set. Exit with an error code
and indicate what went wrong instead of continuing with random stack
content.

Proof of Concept:

```
$ mkswap /dev/null
mkswap: warning: truncating swap area to 17179869180 KiB
mkswap: /dev/null: insecure permissions 0666, fix with: chmod 0600 /dev/null
mkswap: unable to assign device to libblkid probe
```

The first output line depends on stack content and sometimes does not
show up at all. Abort operation if argument is neither regular file nor
block device.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2 years agologger: (man) fix examples
Karel Zak [Fri, 13 Jan 2023 11:18:27 +0000 (12:18 +0100)] 
logger: (man) fix examples

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoinclude: add missing license lines
Karel Zak [Thu, 12 Jan 2023 14:33:09 +0000 (15:33 +0100)] 
include: add missing license lines

The header files are usually based on code from lib/. This commit
copies relevant license headers from lib/ to include/ to keep
things consistent. The very generic things (e.g. MBR definitions)
are always public domain.

Fixes: https://github.com/util-linux/util-linux/issues/2010
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'sint-max' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 12 Jan 2023 13:35:50 +0000 (14:35 +0100)] 
Merge branch 'sint-max' of https://github.com/t-8ch/util-linux

* 'sint-max' of https://github.com/t-8ch/util-linux:
  c.h: avoid undefined behavior in SINT_MAX macro

2 years agoc.h: avoid undefined behavior in SINT_MAX macro
Thomas Weißschuh [Thu, 12 Jan 2023 00:49:35 +0000 (00:49 +0000)] 
c.h: avoid undefined behavior in SINT_MAX macro

The previous implementation relied on signed-integer overflow.
This is undefined behavior.

Instead use an implementation that only requires twos-complement
representation. This is what everybody uses anyways and it will be
required by C23.

2 years agologin: never send signals to init
Samanta Navarro [Wed, 11 Jan 2023 11:57:21 +0000 (11:57 +0000)] 
login: never send signals to init

If the signal handler is triggered after a failed fork attempt, then
child_pid will be -1. This in turn leads to a positive test and a
subsequent call of kill(1, signal). If signal was SIGTERM, then there
will be also another kill(1, SIGHUP) call.

Test explicitly for a positive child_pid value to prevent these cases.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2 years agounshare: support --map-users=inner:outer:count as well as outer,inner,count
Chris Webb [Tue, 10 Jan 2023 13:58:58 +0000 (13:58 +0000)] 
unshare: support --map-users=inner:outer:count as well as outer,inner,count

The argument ordering in /proc/self/[gu]id_map and mount -o X-mount.idmap
is consistently inner:outer:count but unshare --map-users and --map-groups
were originally defined to expect outer,inner,count instead.

To reduce confusion caused by this mismatch, support a colon-separated
inner:outer:count ordering as well as the original comma-separated
outer,inner,count argument format. Although we accept both formats, only
document the new one in the usage text and deprecate the old format in
the man page.

Fixes: https://github.com/util-linux/util-linux/issues/1988
Signed-off-by: Chris Webb <chris@arachsys.com>
2 years agoMerge branch 'typo' of https://github.com/ferivoz/util-linux
Karel Zak [Tue, 10 Jan 2023 14:10:15 +0000 (15:10 +0100)] 
Merge branch 'typo' of https://github.com/ferivoz/util-linux

* 'typo' of https://github.com/ferivoz/util-linux:
  Fix typo

2 years agoinclude: add MOVE_MOUNT_SET_GROUP fallback
Karel Zak [Tue, 10 Jan 2023 13:48:06 +0000 (14:48 +0100)] 
include: add MOVE_MOUNT_SET_GROUP fallback

Addresses: https://github.com/torvalds/linux/commit/9ffb14ef61bab83fa818736bf3e7e6b6e182e8e2
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoFix typo
Samanta Navarro [Tue, 10 Jan 2023 12:00:56 +0000 (12:00 +0000)] 
Fix typo

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2 years agolibmount: use MNT_ERR_APPLYFLAGS for failed mount_setattr()
Karel Zak [Tue, 10 Jan 2023 11:40:47 +0000 (12:40 +0100)] 
libmount: use MNT_ERR_APPLYFLAGS for failed mount_setattr()

The classic mount(2) based version uses MNT_ERR_APPLYFLAGS when not
able to set flags and errno is EINVAL. This is expected by
mnt_context_get_mount_excode() where libmount generates error messages
for mount(8).

Expected is:

 # mount --make-private /mnt/test
 mount: /mnt/test: not mount point or bad option.

rather than generic error:

 mount: /mnt/test: wrong fs type, bad option, bad superblock on none ...

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'waitpid' of https://github.com/t-8ch/util-linux
Karel Zak [Tue, 10 Jan 2023 10:30:55 +0000 (11:30 +0100)] 
Merge branch 'waitpid' of https://github.com/t-8ch/util-linux

* 'waitpid' of https://github.com/t-8ch/util-linux:
  waitpid: adapt bash-completion for current functionality
  po-man: add waitpid.1 manpage
  waitpid: add support for already exited PIDs

2 years agolibmount: fix typo in debug message
Karel Zak [Tue, 10 Jan 2023 10:27:40 +0000 (11:27 +0100)] 
libmount: fix typo in debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: implement X-mount.auto-fstypes
Karel Zak [Mon, 9 Jan 2023 13:22:06 +0000 (14:22 +0100)] 
libmount: implement X-mount.auto-fstypes

Fixes: https://github.com/util-linux/util-linux/issues/1969
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agowaitpid: adapt bash-completion for current functionality
Thomas Weißschuh [Sat, 7 Jan 2023 04:30:18 +0000 (04:30 +0000)] 
waitpid: adapt bash-completion for current functionality

2 years agopo-man: add waitpid.1 manpage
Thomas Weißschuh [Sat, 7 Jan 2023 02:18:22 +0000 (02:18 +0000)] 
po-man: add waitpid.1 manpage

2 years agowaitpid: add support for already exited PIDs
Thomas Weißschuh [Sat, 7 Jan 2023 02:16:06 +0000 (02:16 +0000)] 
waitpid: add support for already exited PIDs

2 years agolibmount: (optlist) keep parsed options without quotes
Karel Zak [Mon, 9 Jan 2023 12:58:45 +0000 (13:58 +0100)] 
libmount: (optlist) keep parsed options without quotes

Some mount options uses quotes due to commas in the value, for
example (SELinux) mount -o 'context="foo,bar"'.

Let's keep this parsed values without quotes in options list. It will
make things more simple.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'po-man/fixes' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 9 Jan 2023 11:47:31 +0000 (12:47 +0100)] 
Merge branch 'po-man/fixes' of https://github.com/t-8ch/util-linux

* 'po-man/fixes' of https://github.com/t-8ch/util-linux:
  sr.po: fix mkfs.cramfs translation
  build: propagate failures from asciidoctor
  po-man: remove unicode dash from manpage NAME section
  sr.po: add missing dash to manpage header
  po-man: always convert common manpage fragments
  po-man: enable out of tree builds
  autotools: add asciidoctor-includetracker to distributed files

2 years agogit: update .gitignore
Karel Zak [Mon, 9 Jan 2023 11:45:24 +0000 (12:45 +0100)] 
git: update .gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'mount.idmap.fix' of https://github.com/brauner/util-linux
Karel Zak [Mon, 9 Jan 2023 11:38:13 +0000 (12:38 +0100)] 
Merge branch 'mount.idmap.fix' of https://github.com/brauner/util-linux

* 'mount.idmap.fix' of https://github.com/brauner/util-linux:
  libmount: ensure child hangs around until we persisted namespace

2 years agoMerge branch 'schedutils' of https://github.com/chaiken/util-linux
Karel Zak [Mon, 9 Jan 2023 11:35:03 +0000 (12:35 +0100)] 
Merge branch 'schedutils' of https://github.com/chaiken/util-linux

* 'schedutils' of https://github.com/chaiken/util-linux:
  schedutils: better illustrate the usage of cpu-lists with taskset
  schedutils: clarify meaning of taskset return code
  schedutils: clarify confusing mask example in taskset man page

2 years agoci: packit: enable -Werror
Thomas Weißschuh [Sat, 7 Jan 2023 13:58:17 +0000 (13:58 +0000)] 
ci: packit: enable -Werror

2 years agowdctl: mark flags field as unsigned long
Thomas Weißschuh [Sun, 8 Jan 2023 03:29:51 +0000 (03:29 +0000)] 
wdctl: mark flags field as unsigned long

This is required by string_to_bitmask().
The previous cast failed on s390x with the following warning:

In function 'string_to_bitmask',
    inlined from 'string_to_bitmask' at lib/strutils.c:802:5,
    inlined from 'main' at sys-utils/wdctl.c:770:8:
lib/strutils.c:829:23: error: write of 64-bit data outside the bound of destination object, data truncated into 32-bit [-Werror=extra]
  829 |                 *mask |= flag;
      |

2 years agolibblkid: topology/sysfs: fix uint64_t handling on 32bit systems
Thomas Weißschuh [Sun, 8 Jan 2023 03:22:35 +0000 (03:22 +0000)] 
libblkid: topology/sysfs: fix uint64_t handling on 32bit systems

2 years agolibblkid: topology/ioctl: fix uint64_t handling on 32bit systems
Thomas Weißschuh [Sun, 8 Jan 2023 03:09:37 +0000 (03:09 +0000)] 
libblkid: topology/ioctl: fix uint64_t handling on 32bit systems

2 years agolibblkid: topolicy/ioctl: use union for multiple data types
Thomas Weißschuh [Sun, 8 Jan 2023 03:08:09 +0000 (03:08 +0000)] 
libblkid: topolicy/ioctl: use union for multiple data types

2 years agoipc_msg_get_limits: always initialize memory
Thomas Weißschuh [Sat, 7 Jan 2023 14:36:11 +0000 (14:36 +0000)] 
ipc_msg_get_limits: always initialize memory

2 years agomkswap: make context_string const
Thomas Weißschuh [Sat, 7 Jan 2023 14:23:56 +0000 (14:23 +0000)] 
mkswap: make context_string const

Sometimes context_str() return `const char *`.

2 years agolibmount: ensure child hangs around until we persisted namespace
Christian Brauner [Sun, 8 Jan 2023 12:05:20 +0000 (13:05 +0100)] 
libmount: ensure child hangs around until we persisted namespace

When we create a new namespace in a child process to persist it we need
to ensure that the child hangs around. During exit the child will drop
all references to its namespaces and so by the time we call open we
might already fail to open the namespace. Fix this.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agoschedutils: better illustrate the usage of cpu-lists with taskset
Alison Chaiken [Sun, 25 Dec 2022 17:37:02 +0000 (09:37 -0800)] 
schedutils: better illustrate the usage of cpu-lists with taskset

Provide a few examples of how to use the cpu-list variant of the taskset
command.

2 years agoschedutils: clarify meaning of taskset return code
Alison Chaiken [Sun, 25 Dec 2022 02:25:26 +0000 (18:25 -0800)] 
schedutils: clarify meaning of taskset return code

Make clear that an EXIT_SUCCESS value returned by taskset does not mean that a
thread has actually migrated to a core matching the affinity request.

2 years agoschedutils: clarify confusing mask example in taskset man page
Alison Chaiken [Sun, 25 Dec 2022 02:12:04 +0000 (18:12 -0800)] 
schedutils: clarify confusing mask example in taskset man page

Omit "0x" from a mask example which is clearly hexadecimal rather than omitting
it from "32", which could be a decimal representation.

2 years agosr.po: fix mkfs.cramfs translation
Thomas Weißschuh [Sat, 7 Jan 2023 03:58:43 +0000 (03:58 +0000)] 
sr.po: fix mkfs.cramfs translation

2 years agobuild: propagate failures from asciidoctor
Thomas Weißschuh [Fri, 6 Jan 2023 23:33:03 +0000 (23:33 +0000)] 
build: propagate failures from asciidoctor

2 years agopo-man: remove unicode dash from manpage NAME section
Thomas Weißschuh [Sat, 7 Jan 2023 02:10:27 +0000 (02:10 +0000)] 
po-man: remove unicode dash from manpage NAME section

Translators seem to like using unicode dashes.
When used in the NAME section of a manpage, asciidoctor will break.
Instead of trying to force all translators to keep this in mind, add an
extension to asciidoctor that takes care of this.

2 years agoautotools: add asciidoctor-includetracker to distributed files
Thomas Weißschuh [Sat, 7 Jan 2023 02:54:01 +0000 (02:54 +0000)] 
autotools: add asciidoctor-includetracker to distributed files

2 years agosr.po: add missing dash to manpage header
Thomas Weißschuh [Sat, 7 Jan 2023 02:43:57 +0000 (02:43 +0000)] 
sr.po: add missing dash to manpage header

asciidoctor fails without it.

2 years agopo-man: always convert common manpage fragments
Thomas Weißschuh [Fri, 6 Jan 2023 23:48:11 +0000 (23:48 +0000)] 
po-man: always convert common manpage fragments

Otherwise the manpage including it can never be built.

2 years agopo-man: enable out of tree builds
Thomas Weißschuh [Fri, 6 Jan 2023 14:54:14 +0000 (14:54 +0000)] 
po-man: enable out of tree builds

2 years agoautotools: add asciidoctor-includetracker to distributed files
Thomas Weißschuh [Sat, 7 Jan 2023 02:54:01 +0000 (02:54 +0000)] 
autotools: add asciidoctor-includetracker to distributed files

2 years agoautotools: fix build for test_loopdev
Thomas Weißschuh [Sat, 7 Jan 2023 02:27:45 +0000 (02:27 +0000)] 
autotools: fix build for test_loopdev

2 years agomeson: fix test_sysfs build
Thomas Weißschuh [Sat, 7 Jan 2023 02:24:49 +0000 (02:24 +0000)] 
meson: fix test_sysfs build

2 years agoMerge branch 'waitpid' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 6 Jan 2023 16:05:04 +0000 (17:05 +0100)] 
Merge branch 'waitpid' of https://github.com/t-8ch/util-linux

* 'waitpid' of https://github.com/t-8ch/util-linux:
  waitpid: add timeout support
  strutils: add function strtotimespec_or_err

2 years agoRevert "CI: update gcc to 12"
Karel Zak [Fri, 6 Jan 2023 15:51:39 +0000 (16:51 +0100)] 
Revert "CI: update gcc to 12"

This reverts commit 85c376a4cd102d5c3619ad937fedf80b6527ce36.

2 years agomount: split and cleanup usage()
Karel Zak [Fri, 6 Jan 2023 15:07:34 +0000 (16:07 +0100)] 
mount: split and cleanup usage()

* split usage() strings to message-per-line (like we use in others
  tools), it's better for maintenance

* use fputs() rather than unnecessary printf()

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolib/sysfs: use temporary buffer
Karel Zak [Fri, 6 Jan 2023 14:58:16 +0000 (15:58 +0100)] 
lib/sysfs: use temporary buffer

It seems more readable (for humans and static analyzers) and safe
to use temporary buffer than use memmove to create absolute path.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agowaitpid: add timeout support
Thomas Weißschuh [Tue, 3 Jan 2023 23:57:53 +0000 (23:57 +0000)] 
waitpid: add timeout support

2 years agostrutils: add function strtotimespec_or_err
Thomas Weißschuh [Fri, 6 Jan 2023 14:36:37 +0000 (14:36 +0000)] 
strutils: add function strtotimespec_or_err

2 years agoMerge branch 'setarch/current' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 6 Jan 2023 12:07:11 +0000 (13:07 +0100)] 
Merge branch 'setarch/current' of https://github.com/t-8ch/util-linux

* 'setarch/current' of https://github.com/t-8ch/util-linux:
  setarch: show current personality

2 years agoMerge branch 'asciidoctor-tracker' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 6 Jan 2023 11:57:49 +0000 (12:57 +0100)] 
Merge branch 'asciidoctor-tracker' of https://github.com/t-8ch/util-linux

* 'asciidoctor-tracker' of https://github.com/t-8ch/util-linux:
  build: track dependencies of manpage generation

2 years agoMerge branch 'master' of https://github.com/jengelh/util-linux
Karel Zak [Fri, 6 Jan 2023 11:50:17 +0000 (12:50 +0100)] 
Merge branch 'master' of https://github.com/jengelh/util-linux

* 'master' of https://github.com/jengelh/util-linux:
  doc: update renice.1 for spelling and style

2 years agoMerge branch 'fix-stringutils-2' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 6 Jan 2023 11:34:39 +0000 (12:34 +0100)] 
Merge branch 'fix-stringutils-2' of https://github.com/t-8ch/util-linux

* 'fix-stringutils-2' of https://github.com/t-8ch/util-linux:
  lib/strutils: fix compiler error

2 years agolib/strutils: fix compiler error
Thomas Weißschuh [Fri, 6 Jan 2023 03:14:27 +0000 (03:14 +0000)] 
lib/strutils: fix compiler error

In file included from /usr/include/stdio.h:894,
                 from lib/strutils.c:8:
In function ‘printf’,
    inlined from ‘test_strutils_cstrcasecmp’ at lib/strutils.c:1324:2,
    inlined from ‘main’ at lib/strutils.c:1348:10:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:112:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  112 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

2 years agoCI: update gcc to 12
Thomas Weißschuh [Fri, 6 Jan 2023 03:00:29 +0000 (03:00 +0000)] 
CI: update gcc to 12

gcc 10 has false positives around null strings:

In file included from /usr/include/stdio.h:894,
                 from lib/strutils.c:8:
In function ‘printf’,
    inlined from ‘test_strutils_cstrcasecmp’ at lib/strutils.c:1324:2,
    inlined from ‘main’ at lib/strutils.c:1348:10:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:112:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  112 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

2 years agobuild: track dependencies of manpage generation
Thomas Weißschuh [Fri, 6 Jan 2023 02:34:09 +0000 (02:34 +0000)] 
build: track dependencies of manpage generation

This will rerun the manpage generation if any of the involved files have
been updated.

2 years agodoc: update renice.1 for spelling and style
Jan Engelhardt [Fri, 6 Jan 2023 00:40:53 +0000 (01:40 +0100)] 
doc: update renice.1 for spelling and style

Relates to issue #1892.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2 years agosetarch: show current personality
Thomas Weißschuh [Wed, 21 Dec 2022 15:50:46 +0000 (15:50 +0000)] 
setarch: show current personality

2 years agolib/strutils: include strings.h
Karel Zak [Thu, 5 Jan 2023 15:01:11 +0000 (16:01 +0100)] 
lib/strutils: include strings.h

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'misc-utils-rename-symlink-paths' of https://github.com/ChickenProp...
Karel Zak [Thu, 5 Jan 2023 12:03:46 +0000 (13:03 +0100)] 
Merge branch 'misc-utils-rename-symlink-paths' of https://github.com/ChickenProp/util-linux

* 'misc-utils-rename-symlink-paths' of https://github.com/ChickenProp/util-linux:
  `rename -s` treats paths the same as without `-s`.

2 years agoMerge branch 'packit' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 5 Jan 2023 11:25:02 +0000 (12:25 +0100)] 
Merge branch 'packit' of https://github.com/t-8ch/util-linux

* 'packit' of https://github.com/t-8ch/util-linux:
  ci: run packit builds for commits on master and releases

2 years agoMerge branch 'libblkid/cache' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 5 Jan 2023 11:09:37 +0000 (12:09 +0100)] 
Merge branch 'libblkid/cache' of https://github.com/t-8ch/util-linux

* 'libblkid/cache' of https://github.com/t-8ch/util-linux:
  blkid: cache: add test

2 years agoMerge branch 'waitpid' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 4 Jan 2023 17:45:10 +0000 (18:45 +0100)] 
Merge branch 'waitpid' of https://github.com/t-8ch/util-linux

* 'waitpid' of https://github.com/t-8ch/util-linux:
  waitpid: add new command
  tests: add ts_skip_exitcode_not_supported
  exitcodes: add EXIT_NOTSUPP
  pidfd-utils: include wait.h for siginfo_t

2 years agolib/signames: ignore locales when searching for signal names
Karel Zak [Wed, 4 Jan 2023 17:37:26 +0000 (18:37 +0100)] 
lib/signames: ignore locales when searching for signal names

Fix: https://github.com/util-linux/util-linux/issues/1991
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoinclude/cctype: add c_strcasecmp() and c_strncasecmp()
Karel Zak [Wed, 4 Jan 2023 17:34:03 +0000 (18:34 +0100)] 
include/cctype: add c_strcasecmp() and c_strncasecmp()

Sometimes, we need to compare ASCII-only strings independently on the
current locales. Let's follow our cctype.h to implement such functions.

Addresses: https://github.com/util-linux/util-linux/issues/1991
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agotests: (column) add range and negative numbers column addresses
Karel Zak [Wed, 4 Jan 2023 13:08:46 +0000 (14:08 +0100)] 
tests: (column) add range and negative numbers column addresses

Addresses: https://github.com/util-linux/util-linux/issues/1700
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agocolumn: support negative numbers in range
Karel Zak [Wed, 4 Jan 2023 12:59:08 +0000 (13:59 +0100)] 
column: support negative numbers in range

Fixes: https://github.com/util-linux/util-linux/issues/1700
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: (mount) consolidate sysapi FDs close [coverity scan]
Karel Zak [Wed, 4 Jan 2023 12:21:17 +0000 (13:21 +0100)] 
libmount: (mount) consolidate sysapi FDs close [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: fix unused variable [coverity scan]
Karel Zak [Wed, 4 Jan 2023 12:13:21 +0000 (13:13 +0100)] 
libmount: fix unused variable [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: (idmap) fix leak and doble free [coverity scan]
Karel Zak [Wed, 4 Jan 2023 12:10:59 +0000 (13:10 +0100)] 
libmount: (idmap) fix leak and doble free [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: (subdir) fix memory leak [coverity scan]
Karel Zak [Wed, 4 Jan 2023 12:04:14 +0000 (13:04 +0100)] 
libmount: (subdir) fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: fix possible double free
Karel Zak [Wed, 4 Jan 2023 11:57:03 +0000 (12:57 +0100)] 
libmount: fix possible double free

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: fix memory leak [coverity scan]
Karel Zak [Wed, 4 Jan 2023 11:35:27 +0000 (12:35 +0100)] 
libmount: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: fix unused value [coverity scan]
Karel Zak [Wed, 4 Jan 2023 11:31:17 +0000 (12:31 +0100)] 
libmount: fix unused value [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: fix memory leak [coverity scan]
Karel Zak [Wed, 4 Jan 2023 11:28:44 +0000 (12:28 +0100)] 
libmount: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>