Commit Graph

15776 Commits

Author SHA1 Message Date
Karel Zak dff176e2f0 meson: make raw(7) optional
Fixes: https://github.com/karelzak/util-linux/issues/1442
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-23 14:09:35 +02:00
Karel Zak 0c19e4ca61 test_mount_optstr: use xstrdup()
Fixes: https://github.com/karelzak/util-linux/issues/1434
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-23 13:11:16 +02:00
Karel Zak 8b3d8aad5d lib/env: don't ignore failed malloc
Fixes: https://github.com/karelzak/util-linux/issues/1434
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-23 13:08:32 +02:00
Karel Zak 54ef08ed37 mkswap: support -U {clear,random,time,uuid}
Let's follow -U from mkfs.ext4 and make it easy to fully control
UUIDs for the swap area.

Fixes: https://github.com/karelzak/util-linux/issues/1453
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-23 11:53:26 +02:00
Karel Zak 10fd91d389 Merge branch 'int/alex/hifive_uuid' of https://github.com/AlexGhiti/util-linux
* 'int/alex/hifive_uuid' of https://github.com/AlexGhiti/util-linux:
  include: Rename HiFive partition UUIDs
2021-09-23 11:15:31 +02:00
Karel Zak 5be4d46706 Merge branch 'master' of https://github.com/mariobl/util-linux
* 'master' of https://github.com/mariobl/util-linux:
  Man pages: Fix end extend formatting
2021-09-23 11:12:10 +02:00
Karel Zak 79534c0d7e mount: add hint about dmesg(8) to error messages
Fixes: https://github.com/karelzak/util-linux/pull/1444
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-23 11:07:55 +02:00
Alexandre Ghiti 6dc3629032 include: Rename HiFive partition UUIDs
Both HiFive Unleashed and HiFive Unmatched bootloaders seek for the same
UUIDs to load the next stage bootloader: the current name makes partitions
on Unmatched board appear as 'Unleashed'.

Fix that by removing the 'Unleashed' part of the current naming so it
fits both.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2021-09-22 06:38:14 +02:00
Mario Blättermann e674323904 Man pages: Fix end extend formatting 2021-09-21 20:48:11 +02:00
Mario Blättermann 256e524f57 mount.8.adoc: fix misformatting
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-21 10:48:37 +02:00
Michael Kerrisk dd14f95b9b unshare.1.adoc: Improve wording re creation of bind mounts
Use consistent wording for the options that create
bind mounts, and improve the wording.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-09-21 10:46:09 +02:00
Michael Kerrisk 841fc3a26c unshare.1.adoc: Improve wording re namespace creation
The terminonoly "unshare the namespace" is not very helpful.
Instead, use wording that explains what these options actually
fo: "create a new namespace".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-09-21 10:45:54 +02:00
Karel Zak 80ed8688d1 github: add meson build target
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-16 13:25:07 +02:00
Karel Zak aa57994f73 Merge branch 'meson-fixes' of https://github.com/Hello71/util-linux
* 'meson-fixes' of https://github.com/Hello71/util-linux:
  meson: make asciidoc optional
  meson: fix building libsmartcols
  meson: fix building logger
2021-09-16 13:07:05 +02:00
Karel Zak f45c818004 dmesg: translate ctime strings
Let's make the date-time strings accessible for translators.

Fixes: https://github.com/karelzak/util-linux/issues/1451
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-16 12:50:01 +02:00
Karel Zak 02f8593927 logger: fix --prio-prefix doesn't use --priority default
The commit b9ef27f have added priority check, but it introduced
regression as the default priority (as specified by --priority) is
ignored.

This patch fixes this problem, but it also removes extra check for
"kern facility", it's unnecessary and inconsistent with the rest of
logger.

Fixes: https://github.com/karelzak/util-linux/issues/1450
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-16 12:20:25 +02:00
Karel Zak 4ba84b0aed logger: dealloc login name
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-16 12:15:56 +02:00
Karel Zak 8e455177fe Merge branch 'losetup-direct-dio' of https://github.com/Hello71/util-linux
* 'losetup-direct-dio' of https://github.com/Hello71/util-linux:
  losetup: directly set dio instead of afterwards
2021-09-16 11:32:57 +02:00
Karel Zak 5fe1d1e89b Merge branch 'more-shell-execution' of https://github.com/ritikrajdev/util-linux
* 'more-shell-execution' of https://github.com/ritikrajdev/util-linux:
  more - Bug Resolve - new line separated command execution
2021-09-16 11:00:33 +02:00
Karel Zak bc75fb4729 Merge branch 'refactor-tests' of https://github.com/Ajchler/util-linux
* 'refactor-tests' of https://github.com/Ajchler/util-linux:
  tests: use subtests
  tests: make use of subtests
2021-09-16 10:51:27 +02:00
ritikrajdev e5e0eac42c
more - Bug Resolve - new line separated command execution 2021-09-14 04:27:14 +05:30
Vojtěch Eichler 635fd4af54 tests: use subtests 2021-09-13 10:59:59 +02:00
Alex Xu (Hello71) d53346ed08 losetup: directly set dio instead of afterwards
This avoids an extra syscall, and allows the kernel to automatically set
block size [0], avoiding unnecessary failure with 4096-byte devices.

This changes the observable behavior of losetup --direct-io in the case
where DIO is not supported to fully fail, instead of creating a
non-direct-io device. If the user explicitly specifies --direct-io, then
they should get either a DIO loopdev or no loopdev, not a non-DIO
loopdev and a misleading error.

Additionally, loopcxt_setup_device now uses O_CLOEXEC in the read-only
fallback.

[0] 85560117d0
2021-09-09 09:55:03 -04:00
Vojtěch Eichler 99120a8bde tests: make use of subtests 2021-09-08 12:36:19 +02:00
Alex Xu (Hello71) 00b8a51f88 meson: make asciidoc optional
it should be under an option like autoconf, but cba to do that now, and
this is an improvement over the status quo.
2021-09-07 18:58:48 -04:00
Alex Xu (Hello71) 231c2ffb9a meson: fix building libsmartcols 2021-09-07 18:58:32 -04:00
Alex Xu (Hello71) dbb9999fea meson: fix building logger 2021-09-07 18:58:16 -04:00
Karel Zak 78001b7af3 Merge branch 'master' of https://github.com/yugart/util-linux
* 'master' of https://github.com/yugart/util-linux:
  Fix memory leaks in the chcpu
2021-09-07 12:30:15 +02:00
Karel Zak bcfa32d714 eject: fix typo in docs
Fixes: https://github.com/karelzak/util-linux/issues/1436
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-09-07 12:27:54 +02:00
jiazhenyuan a283ad4ed2 Fix memory leaks in the chcpu 2021-09-06 16:50:27 +08:00
Rafael Fontenelle 0e85613e3a Fix misspellings 2021-09-04 11:11:04 -03:00
Chris Hofstaedtler 597ccb7bf5 tests: Skip lsns/ioctl_ns test if unshare fails
Some parts of the Debian build infrastructure uses unshare to run the
package build, and that appears to cause a "nested" unshare in the
lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this
point.

Try running unshare before the actual test, and skip the test if unshare
already fails.

[kzak@redhat.com: - add --fork to the test
                  - don't write to stdout/err]

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-31 15:18:34 +02:00
Karel Zak 059811d096 su: (bash-completion) offer usernames rather than files
Fixes: https://github.com/karelzak/util-linux/issues/1424
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-31 12:51:40 +02:00
Karel Zak 9714331843 column: segmentation fault on invalid unicode input passed to -s option
The function mbs_to_wcs() returns NULL on invalid UTF.

Fixes: https://github.com/karelzak/util-linux/issues/1425
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-31 12:31:15 +02:00
Karel Zak 4693a1bba9 Merge branch 'bug/1416' of https://github.com/V-Smeets/util-linux
* 'bug/1416' of https://github.com/V-Smeets/util-linux:
  Erase line before writing the filename
2021-08-31 12:26:00 +02:00
Karel Zak f362b6c0ea Merge branch 'patch-2' of https://github.com/rffontenelle/util-linux
* 'patch-2' of https://github.com/rffontenelle/util-linux:
  asciidoc: unconstrained formatting pair in fdisk
2021-08-31 12:08:38 +02:00
Karel Zak 2987dddca6 Merge branch 'patch-1' of https://github.com/rffontenelle/util-linux
* 'patch-1' of https://github.com/rffontenelle/util-linux:
  asciidoc: fix quoted message in fsck.minix
2021-08-31 12:07:34 +02:00
Karel Zak e46f9fce30 tests: use sub-tests for dm-verity
* write error to the test log file rather than on stdout
* use sub-tests to get more info on output
* don't use ts_die in sub-tests to make sure we call final dmsetup remove

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-31 11:57:30 +02:00
Karel Zak 688edfc15b tests: check for dm-verity support
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-31 11:40:45 +02:00
Vojtěch Eichler 8edd055f41 tests: add tests for dm-verity support in mount 2021-08-31 11:24:59 +02:00
Karel Zak 68d7dc7b46 docs: add hint about TP
Addresses: https://github.com/karelzak/util-linux/issues/1421
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-31 11:02:26 +02:00
Naohiro Aota e72528403e lsblk: add zoned columns to "lsblk -z"
Add zoned columns to the "-z" option as follow.

$ lsblk -z -i
NAME        ZONED        ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-WGRAN
sda         host-managed    256M   55880         0       128     672K         4K
sdb         host-managed    256M   55880         0       128     672K         4K
zram0       none              0B       0         0         0       0B         0B
nvme2n1     none              0B       0         0         0       0B         0B
|-nvme2n1p1 none              0B       0         0         0       0B         0B
|-nvme2n1p2 none              0B       0         0         0       0B         0B
`-nvme2n1p3 none              0B       0         0         0       0B         0B
nvme0n1     none              0B       0         0         0       0B         0B
nvme1n1     none              0B       0         0         0       0B         0B
nvme0n2     host-managed      2G    1844        14        14       4M         4K
nvme1n2     host-managed      2G    1844        14        14       4M         4K

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
2021-08-31 10:24:28 +02:00
Naohiro Aota ca5f4bd0d6 lsblk: add columns of zoned parameters
Several parameters for zoned devices are missing from lsblk's columns. This
commit introduces them as following.

 ZONE-SZ     zone size
 ZONE-WGRAN  zone write granularity
 ZONE-APP    zone append max bytes
 ZONE-NR     number of zones
 ZONE-OMAX   maximum number of open zones
 ZONE-AMAX   maximum number of active zones

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
2021-08-31 10:24:20 +02:00
Naohiro Aota abb6e8e67a lsblk: factor out function to read sysfs param as bytes
Factor out a new function device_read_bytes() to read a sysfs path as bytes
for a preparation for the next commit and to reduce the code duplication.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
2021-08-31 10:23:47 +02:00
Rafael Fontenelle 5f618ca4b2 asciidoc: unconstrained formatting pair in fdisk
Not using unconstrained witl result in showing asterisk instead, which is unwanted.
2021-08-30 07:25:20 -03:00
Rafael Fontenelle e3668f436c
asciidoc: fix quoted message in fsck.minix 2021-08-29 17:10:05 -03:00
Hill Ma 28d6722d93 Add partition type GUID for Haiku. 2021-08-24 14:21:27 -07:00
Karel Zak abe16d0d34 tests: make eject umount tests more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-24 10:49:32 +02:00
Karel Zak 85ae61dd6d tests: make mount/fstab-all more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-23 16:28:52 +02:00
Karel Zak 331c5e0c54 tests: make ./run.sh more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-08-23 15:15:38 +02:00