]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Naohiro Aota [Mon, 26 Apr 2021 05:50:34 +0000 (14:50 +0900)]
libblkid: implement zone-aware probing
This patch makes libblkid zone-aware. It can probe the magic located at
some offset from the beginning of some specific zone of a device.
This patch introduces some new fields to struct blkid_idmag. They indicate
the magic location is placed related to a zone and the offset in the zone.
Also, this commit introduces `zone_size` to struct blkid_struct_probe. It
stores the size of zones of a device.
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Karel Zak [Wed, 28 Apr 2021 11:04:16 +0000 (13:04 +0200)]
lsns: make --tree default, update man-page
* make --tree=process default for 'lsns' and 'lsns <ns>'
* remove 'list' from struct lsns
* update man page
Addresses: https://github.com/karelzak/util-linux/pull/1281
Signed-off-by: Karel Zak <kzak@redhat.com>
Masatake YAMATO [Fri, 23 Apr 2021 10:55:46 +0000 (19:55 +0900)]
lsns: fix passing wrong process lists when showing ownerns and parentns
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Masatake YAMATO [Tue, 20 Apr 2021 08:09:02 +0000 (17:09 +0900)]
lsns: unify the code and option for printing process based tree and namespace based trees
Suggested by Karel Zak.
`--tree` option is introduced as replacement for `--nstree`.
In addition to `parent` and `owner`, `--tree` take `process` as the
option argument.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Masatake YAMATO [Thu, 15 Apr 2021 09:03:57 +0000 (18:03 +0900)]
lsns: print namespace tree based on the relationship (parent/child or owner/owned)
Introduce new option -T[parent|owner]|--nstree[=parent|=owner].
With this change, lsns prints parent/child relationship tree if
"-T parent" is given and owner/owned relationship tree if "-T owner is given.
Passing only "-T" is same as passing "-Towner."
Example sessions:
# ./lsns -Tparent -ons,type,pns| head -20
NS TYPE PNS
4026531837 user 0
├─
4026532508 user
4026531837
├─
4026532609 user
4026531837
├─
4026532610 user
4026531837
├─
4026532629 user
4026531837
├─
4026532705 user
4026531837
├─
4026532901 user
4026531837
├─
4026533090 user
4026531837
├─
4026533185 user
4026531837
├─
4026533280 user
4026531837
└─
4026533468 user
4026531837
4026531835 cgroup 0
4026531836 pid 0
└─
4026533038 pid
4026531836
├─
4026532934 pid
4026533038
├─
4026533715 pid
4026533038
├─
4026533716 pid
4026533038
...
# ./lsns -Towner -ons,type,ons| head -20
NS TYPE ONS
4026531837 user 0
├─
4026531835 cgroup
4026531837
├─
4026531836 pid
4026531837
├─
4026531838 uts
4026531837
├─
4026531839 ipc
4026531837
├─
4026531840 mnt
4026531837
├─
4026531861 mnt
4026531837
├─
4026532001 net
4026531837
├─
4026532219 mnt
4026531837
├─
4026532357 mnt
4026531837
├─
4026532383 net
4026531837
├─
4026532475 mnt
4026531837
├─
4026532476 mnt
4026531837
├─
4026532504 mnt
4026531837
├─
4026532508 user
4026531837
│ ├─
4026532509 ipc
4026532508
│ └─
4026532511 net
4026532508
├─
4026532573 mnt
4026531837
├─
4026532574 mnt
4026531837
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Karel Zak [Sun, 23 May 2021 21:52:00 +0000 (23:52 +0200)]
lscpu: add MHZ to the -e output
Addresses: https://github.com/karelzak/util-linux/issues/1314
Signed-off-by: Karel Zak <kzak@redhat.com>
Zbigniew Jędrzejewski-Szmek [Fri, 21 May 2021 08:45:35 +0000 (10:45 +0200)]
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.
Karel Zak [Thu, 20 May 2021 07:32:53 +0000 (09:32 +0200)]
Merge branch 'more-floating-point' of https://github.com/kerolasa/util-linux
* 'more-floating-point' of https://github.com/kerolasa/util-linux:
more: fix floating point exception core dump
Karel Zak [Thu, 20 May 2021 07:25:46 +0000 (09:25 +0200)]
fstrim: fix paths comparison
Fix: https://github.com/karelzak/util-linux/issues/1312
Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Wed, 19 May 2021 19:23:48 +0000 (20:23 +0100)]
more: fix floating point exception core dump
Make the code avoid divided by zero. This can happen when file has content
but is zero in size. Such files can be found from procfs, possibly some
other pseudo-filesystems. To reproduce the issue run the following.
$ more /proc/crypto
...
Floating point exception (core dumped)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Karel Zak [Thu, 13 May 2021 10:21:56 +0000 (12:21 +0200)]
build-sys: fix po-man/ make check
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 13 May 2021 08:34:14 +0000 (10:34 +0200)]
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>
Karel Zak [Thu, 13 May 2021 08:24:25 +0000 (10:24 +0200)]
Merge branch 'whitespace' of https://github.com/eworm-de/util-linux
Karel Zak [Thu, 13 May 2021 08:23:34 +0000 (10:23 +0200)]
build-sys: update util-linux-man.pot on 'make dist'
Signed-off-by: Karel Zak <kzak@redhat.com>
Christian Hesse [Mon, 10 May 2021 13:53:50 +0000 (15:53 +0200)]
fix whitespace issue in ducumentation
This removes trailing whitespaces and fixes minor issues.
Karel Zak [Mon, 10 May 2021 11:12:02 +0000 (13:12 +0200)]
build-sys: release++ (v2.37-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 10 May 2021 11:10:21 +0000 (13:10 +0200)]
docs: update v2.37-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 10 May 2021 11:09:13 +0000 (13:09 +0200)]
docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 10 May 2021 10:21:25 +0000 (12:21 +0200)]
po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
Sebastian Rasmussen [Mon, 10 May 2021 10:15:03 +0000 (12:15 +0200)]
po: update sv.po (from translationproject.org)
Karel Zak [Mon, 10 May 2021 10:13:09 +0000 (12:13 +0200)]
tests: update build tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 10 May 2021 09:24:24 +0000 (11:24 +0200)]
build-sys: fix libblkid dependence
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 10 May 2021 08:46:51 +0000 (10:46 +0200)]
column: add placeholder '0' to specify all columns
Fixes: https://github.com/karelzak/util-linux/issues/1306
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 May 2021 18:38:26 +0000 (20:38 +0200)]
blkdiscard: fix compilation without libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 May 2021 18:37:51 +0000 (20:37 +0200)]
mkswap: remove unused variable when compile without libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 May 2021 09:26:33 +0000 (11:26 +0200)]
docs: add #1266 to TODO file
References: https://github.com/karelzak/util-linux/issues/1266
Signed-off-by: Karel Zak <kzak@redhat.com>
Johan Herland [Thu, 6 May 2021 22:53:29 +0000 (00:53 +0200)]
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.
Karel Zak [Thu, 6 May 2021 15:10:46 +0000 (17:10 +0200)]
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>
Karel Zak [Thu, 6 May 2021 15:02:40 +0000 (17:02 +0200)]
tests: update libfdisk JSON outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 15:01:48 +0000 (17:01 +0200)]
libfdisk: (script) print bootable flag only when set
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 14:44:20 +0000 (16:44 +0200)]
rfkill: fix compiler warning [-Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 14:35:50 +0000 (16:35 +0200)]
lib/jsonwrt: don't use ctype.h for ASCII chars
tolower() does not work "as expected" for tr_TR.UTF-8 (Turkish).
Fortunately, we need to convert only objects and variables names in
JSON output, and this is always old good ASCII.
Anyway, for more details:
$ cat a.c
#include <ctype.h>
#include <stdio.h>
#include <locale.h>
int main(void)
{
int in, out;
setlocale(LC_ALL, "");
in ='I';
out = tolower(in);
printf("%1$c [%1$d] --> %2$c [%2$d]\n", in, out);
return 0;
}
$ make a
cc a.c -o a
$ LANG=en_US.utf8 ./a
I [73] --> i [105]
$ LANG=tr_TR.UTF-8 ./a
I [73] --> I [73]
Fixes: https://github.com/karelzak/util-linux/issues/1302
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 14:05:56 +0000 (16:05 +0200)]
lib/jsonwrt: remove fputs_quoted_json_* functions from include/carefulputc.h
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 13:58:02 +0000 (15:58 +0200)]
lib/jsonwrt: remove 'islast' from API
The code should be able to keep track about previous content and print
JSON objects separator automatically.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 13:02:14 +0000 (15:02 +0200)]
libfdisk: use lib/jsonwrt.s for JSON formatting
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 10:24:41 +0000 (12:24 +0200)]
rfkill: fix compiler warning [-Wformat=]
* `RFKILL_EVENT_SIZE_V1` is defined as sizeof(struct rfkill_event), so let's use %zu
* cast `len` to size_t to make it usable with %zu
Signed-off-by: Karel Zak <kzak@redhat.com>
Masatake YAMATO [Thu, 6 May 2021 04:39:30 +0000 (13:39 +0900)]
lib/fileutils: close fd if fdopen is failed
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Karel Zak [Thu, 6 May 2021 09:56:14 +0000 (11:56 +0200)]
hwclock: follow timespec and use long int for nsec
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
script: fix time_t=long assumptions
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
rtcwake: fix time_t=long assumptions
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 09:06:45 +0000 (11:06 +0200)]
lib/strutils: assume 64-bit time_t
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
hardlink: fix time_t=long assumptions
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
test_uuid_parser: fix time_t=long assumptions
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
fsck: fix time_t=long assumptions
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
scriptplay: fix time_t=long assumptions
Fixes: https://github.com/karelzak/util-linux/issues/1069
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
lib/pty-session: fix time_t=long assumptions
Fixes: https://github.com/karelzak/util-linux/issues/1069
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)]
flock: fix time_t=long assumptions
This also fixes flock for archs (e.g. sparc64) where suseconds_t is not long.
Fixes: https://github.com/karelzak/util-linux/issues/1069
References: http://github.com/karelzak/util-linux/commit/
ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 5 May 2021 11:35:30 +0000 (13:35 +0200)]
build-sys: keep adoc files in dist_noinst_DATA
* rename MANPAGES_EXTRA= to ADOCFILES_COMMON=
* keep track about individual adoc files by dist_noinst_DATA=
This variable is not effected by automake conditions, so the files
are always distributed.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 3 May 2021 18:30:42 +0000 (20:30 +0200)]
tests: update sparc lscpu tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 3 May 2021 18:28:30 +0000 (20:28 +0200)]
lscpu: assume L1d, L1i, L2, L3 for sparc
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 3 May 2021 14:27:35 +0000 (16:27 +0200)]
lscpu: read Sparc caches files
Fixes: https://github.com/karelzak/util-linux/issues/1296
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 3 May 2021 09:10:10 +0000 (11:10 +0200)]
meson: fix systemd dependence
Fixes: https://github.com/karelzak/util-linux/issues/1301
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Apr 2021 11:12:26 +0000 (13:12 +0200)]
Merge branch 'master' of https://github.com/arbego/util-linux
* 'master' of https://github.com/arbego/util-linux:
Fixed wrongful time_t=long assumptions in hwclock.c and timeutils.c
Changed int64_t casts to long long int casts
Fixed format strings and type casts in hwclock to work with 64-bit time_t on 32-bit linux
Armin Begovic [Thu, 29 Apr 2021 11:55:52 +0000 (11:55 +0000)]
Fixed wrongful time_t=long assumptions in hwclock.c and timeutils.c
heitbaum [Thu, 29 Apr 2021 08:19:50 +0000 (08:19 +0000)]
build-sys: add configure options to disable individual utils
Karel Zak [Wed, 28 Apr 2021 08:51:07 +0000 (10:51 +0200)]
lscpu: fix "caches" header
It's possible that lscpu does not print any caches if full caches size
is zero. In this case we do not need the header.
Addresses: https://github.com/karelzak/util-linux/issues/1207
Signed-off-by: Karel Zak <kzak@redhat.com>
Mario Blättermann [Sat, 24 Apr 2021 10:20:08 +0000 (12:20 +0200)]
docs/TODO: Minor update and fix typo
Armin Begovic [Fri, 23 Apr 2021 21:28:37 +0000 (23:28 +0200)]
Changed int64_t casts to long long int casts
Armin Begovic [Fri, 23 Apr 2021 20:48:13 +0000 (22:48 +0200)]
Fixed format strings and type casts in hwclock to work with 64-bit time_t on 32-bit linux
Karel Zak [Fri, 23 Apr 2021 11:01:57 +0000 (13:01 +0200)]
zramctl: (man) fix streams default number
References: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html#set-max-number-of-compression-streams
References: https://github.com/torvalds/linux/commit/
da9556a2367cf2261ab4d3e100693c82fb1ddb26
Fixes: https://github.com/karelzak/util-linux/issues/1283
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 23 Apr 2021 09:35:20 +0000 (11:35 +0200)]
scriptlive: (man) add missing parenthesis
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 23 Apr 2021 08:49:10 +0000 (10:49 +0200)]
Merge branch 'fix-misspellings' of https://github.com/rffontenelle/util-linux
Karel Zak [Fri, 23 Apr 2021 08:44:46 +0000 (10:44 +0200)]
Merge branch 'master' of https://github.com/mariobl/util-linux
* 'master' of https://github.com/mariobl/util-linux:
po-man: Fix typos in de.po and po4a.cfg
hardlink: fix typo
Karel Zak [Fri, 23 Apr 2021 08:43:06 +0000 (10:43 +0200)]
docs: update TODO
Addresses: https://github.com/karelzak/util-linux/issues/1291
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 23 Apr 2021 08:39:35 +0000 (10:39 +0200)]
build-sys: add .stamp to gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 22 Apr 2021 14:11:51 +0000 (16:11 +0200)]
build-sys: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
Rafael Fontenelle [Thu, 22 Apr 2021 23:31:05 +0000 (20:31 -0300)]
Fix misspellings
Mario Blättermann [Thu, 22 Apr 2021 16:50:46 +0000 (18:50 +0200)]
po-man: Fix typos in de.po and po4a.cfg
Mario Blättermann [Thu, 22 Apr 2021 16:41:50 +0000 (18:41 +0200)]
Merge remote-tracking branch 'upstream/master'
Karel Zak [Thu, 22 Apr 2021 13:59:54 +0000 (15:59 +0200)]
build-sys: disable po-man by default, cleanup summary
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 22 Apr 2021 08:19:50 +0000 (10:19 +0200)]
build-sys: add uninstall to po-man
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 21 Apr 2021 17:55:27 +0000 (19:55 +0200)]
build-sys: add targets to generated translated man pages
* add --enable-poman (disabled by default)
* add po-man/Makefile.am for "make all" and "make install"
* install man pages to $mandir/$lang/man{1,3,5,8}
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 22 Apr 2021 13:23:27 +0000 (15:23 +0200)]
Merge branch 'topic/po4a' of https://github.com/mariobl/util-linux
* 'topic/po4a' of https://github.com/mariobl/util-linux:
mount.a.adoc: Fix markup
Asciidoc: Add missing macro definition in uclampset.1
Asciidoc: Fix markup in example man page
Asciidoc: Fix markup
Asciidoc: Remove artifact from merge conflict
Asciidoc: Convert man-common/README to Markdown
po-man: Fix the example man page
po-man: Fix typos in po-man/README.md
po-man: Update the example man page
po-man: Add po-man/README.md
po-man: Add (incomplete) de.po for testing purposes
po-man: Add (incomplete) de.po for testing purposes
po-man: Adjust paths in po4a.cfg and update .pot file
po-man: Move Po4a config file and translation template to po-man
Karel Zak [Tue, 20 Apr 2021 12:39:32 +0000 (14:39 +0200)]
build-sys: cleanup Makefiles
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 20 Apr 2021 12:22:34 +0000 (14:22 +0200)]
build-sys: fix test_loopdev build
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 20 Apr 2021 11:20:12 +0000 (13:20 +0200)]
lib/loopdev: fix is_loopdev() to be usable with partitions
The current implementation of the function does not care if the device
is whole-disk device or partition, all is loopdev. This is regression
as the original is_loopdev() version was based on whole-disk devices
major numbers only.
Fixes: https://github.com/karelzak/util-linux/issues/1202
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 19 Apr 2021 13:30:57 +0000 (15:30 +0200)]
hardlink: fix typo again
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 19 Apr 2021 11:19:23 +0000 (13:19 +0200)]
libfdisk: do not reset default if undefined by script
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 19 Apr 2021 08:09:08 +0000 (10:09 +0200)]
hardlink: fix typo
Reported-by: Mario Blättermann <mario.blaettermann@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 19 Apr 2021 08:05:05 +0000 (10:05 +0200)]
Merge branch 'fix-swapon-summary-heading-alignment' of https://github.com/sebras/util-linux
* 'fix-swapon-summary-heading-alignment' of https://github.com/sebras/util-linux:
swapon: Keep headings and fields aligned in summary output.
Karel Zak [Mon, 19 Apr 2021 08:00:42 +0000 (10:00 +0200)]
Merge branch 'fix-typo' of https://github.com/sebras/util-linux
* 'fix-typo' of https://github.com/sebras/util-linux:
Fix typo in help message.
Karel Zak [Mon, 19 Apr 2021 07:59:42 +0000 (09:59 +0200)]
Merge branch 'fix-first-lba' of https://github.com/samueldr/util-linux
* 'fix-first-lba' of https://github.com/samueldr/util-linux:
libfdisk: Include table-length in first-lba checks
Karel Zak [Mon, 19 Apr 2021 07:33:28 +0000 (09:33 +0200)]
Merge branch 'lsblk-E-completion' of https://github.com/scop/util-linux
* 'lsblk-E-completion' of https://github.com/scop/util-linux:
bash-completion: (lsblk) fix -E/-M arg (non-)completion
Karel Zak [Mon, 19 Apr 2021 07:32:12 +0000 (09:32 +0200)]
Merge branch 'update-lsns-man-page' of https://github.com/masatake/util-linux
* 'update-lsns-man-page' of https://github.com/masatake/util-linux:
man: add ioctl_ns(2) to SEE ALSO of lsns(2)
Mario Blättermann [Sun, 18 Apr 2021 10:16:37 +0000 (12:16 +0200)]
mount.a.adoc: Fix markup
Mario Blättermann [Sun, 18 Apr 2021 07:17:31 +0000 (09:17 +0200)]
hardlink: fix typo
Sebastian Rasmussen [Sun, 18 Apr 2021 01:41:50 +0000 (03:41 +0200)]
swapon: Keep headings and fields aligned in summary output.
Because the headings are aligned with tabs the fields must
always be a multiple of 8 characters. Moreover if the field
values are shorter than 8 characters, extra tabs must be
inserted before the succeding field to keep alignment.
swapon parses /proc/swaps, generated by the Linux kernel in
mm/swapfile.c. Its function swap_show() and its recent fix in
commit
6f7939405f61de7d0da7f6c90182e96c4f5ff6c1 were used as
inspiration for this commit.
Additionally inform the translators about the requirements of
formatting and relationship between the heading and entry strings.
Samuel Dionne-Riel [Sat, 17 Apr 2021 06:17:53 +0000 (02:17 -0400)]
libfdisk: Include table-length in first-lba checks
Otherwise, sfdisk would error out on its own dump, as first-lba would be
earlier than "plausible" assuming the default table size.
This is because it did not look for `table-length` when using an sfdisk
script. This means that using `--dump` on a valid image, could not be
unserialized back into a valid image.
This is helpful in exotic situations, where a partition has to be
created earlier than the conventional "first-lba" (2048). For example,
on Allwinner A64 boards, where a firmware is stored at LBA16. With this
it is possible to ask for `first-lba` at or earlier than 16, by reducing
the number of entries to e.g. 48.
Sebastian Rasmussen [Sat, 17 Apr 2021 12:40:13 +0000 (14:40 +0200)]
Fix typo in help message.
Ville Skyttä [Fri, 16 Apr 2021 19:08:48 +0000 (22:08 +0300)]
bash-completion: (lsblk) fix -E/-M arg (non-)completion
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Masatake YAMATO [Thu, 15 Apr 2021 22:51:45 +0000 (07:51 +0900)]
man: add ioctl_ns(2) to SEE ALSO of lsns(2)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Karel Zak [Thu, 15 Apr 2021 13:11:44 +0000 (15:11 +0200)]
libfdisk: use open(O_EXCL) to detect if device is used
It's seems detection by BLKRRPART is broken in recent kernels
(probably regression), and it's also overkill to force kernel re-read
all and generate all the events. It seems more elegant to use O_EXCL.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 15 Apr 2021 12:43:15 +0000 (14:43 +0200)]
fdisk: warn if disk in use
Fixes: https://github.com/karelzak/util-linux/issues/1278
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 15 Apr 2021 12:39:11 +0000 (14:39 +0200)]
cfdisk: warn if disk on use
Fixes: https://github.com/karelzak/util-linux/issues/1278
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 15 Apr 2021 10:29:27 +0000 (12:29 +0200)]
docs: add kernel version and commit to info about mountinfo workaround
Fixes: https://github.com/karelzak/util-linux/issues/1280
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 14 Apr 2021 14:25:30 +0000 (16:25 +0200)]
libsmartcols: make buffers append function more robust
Fixes: https://github.com/karelzak/util-linux/issues/1279
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 14 Apr 2021 14:15:34 +0000 (16:15 +0200)]
prlimit: make code more robust
The prlimit description are always defined as static strings, but it
seems better to make the code more readable and robust for static
analyzers and readers.
Fix also missing gettext() call for description help.
Fixes: https://github.com/karelzak/util-linux/issues/1277
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 13 Apr 2021 08:40:00 +0000 (10:40 +0200)]
tests: small change to the lsns/ioctl_ns
* make description short
* chmod a+x to make script executable
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 13 Apr 2021 08:34:49 +0000 (10:34 +0200)]
Merge branch 'ioctl_ns' of https://github.com/masatake/util-linux
* 'ioctl_ns' of https://github.com/masatake/util-linux:
lsns: add columns for parent namespaces and owner namespaces
Karel Zak [Tue, 13 Apr 2021 08:23:26 +0000 (10:23 +0200)]
po: use msgmerge --previous
Reported-by: Mario Blättermann <mario.blaettermann@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>