Commit Graph

15606 Commits

Author SHA1 Message Date
Karel Zak 842ec4ce6b build-sys: fix po-man/ make check
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-13 12:21:56 +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
Karel Zak cef52b197a Merge branch 'whitespace' of https://github.com/eworm-de/util-linux 2021-05-13 10:24:25 +02:00
Karel Zak 65abace259 build-sys: update util-linux-man.pot on 'make dist'
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-13 10:23:34 +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 d637ca3e17 build-sys: release++ (v2.37-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-10 13:12:02 +02:00
Karel Zak a6b49e89ed docs: update v2.37-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-10 13:10:37 +02:00
Karel Zak 524897ed63 docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-10 13:09:13 +02:00
Karel Zak 2994605fba po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-10 12:21:25 +02:00
Sebastian Rasmussen b93b8f42df po: update sv.po (from translationproject.org) 2021-05-10 12:15:03 +02:00
Karel Zak c916e84380 tests: update build tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-10 12:13:09 +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 21b16433a1 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>
2021-05-10 10:46:51 +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
Karel Zak 3773bb151a mkswap: remove unused variable when compile without libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-07 20:37:51 +02:00
Karel Zak 0ee5fcd2e8 docs: add #1266 to TODO file
References: https://github.com/karelzak/util-linux/issues/1266
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-07 11:26:33 +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
Karel Zak fe58418e9d tests: update libfdisk JSON outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 17:02:40 +02:00
Karel Zak 940f9def45 libfdisk: (script) print bootable flag only when set
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 17:01:48 +02:00
Karel Zak 787af7ce7c rfkill: fix compiler warning [-Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 16:44:20 +02:00
Karel Zak 64a89adaa1 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>
2021-05-06 16:35:50 +02:00
Karel Zak 3a07505a39 lib/jsonwrt: remove fputs_quoted_json_* functions from include/carefulputc.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 16:05:56 +02:00
Karel Zak d124a78034 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>
2021-05-06 15:58:02 +02:00
Karel Zak 4b9abd11eb libfdisk: use lib/jsonwrt.s for JSON formatting
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 15:02:14 +02:00
Karel Zak f798aed128 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>
2021-05-06 12:25:10 +02:00
Masatake YAMATO c8d931ebe2 lib/fileutils: close fd if fdopen is failed
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2021-05-06 12:20:14 +02:00
Karel Zak f6c1168925 hwclock: follow timespec and use long int for nsec
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 11:56:14 +02:00
Karel Zak 9406284a92 script: fix time_t=long assumptions
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 11:37:10 +02:00
Karel Zak 01b37affc1 rtcwake: fix time_t=long assumptions
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 11:07:22 +02:00
Karel Zak 35c84bf76a lib/strutils: assume 64-bit time_t
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 11:06:45 +02:00
Karel Zak 634636301e hardlink: fix time_t=long assumptions
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 10:45:16 +02:00
Karel Zak 7e349033e0 test_uuid_parser: fix time_t=long assumptions
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 10:43:13 +02:00
Karel Zak c13ce8f4d6 fsck: fix time_t=long assumptions
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 10:40:32 +02:00
Karel Zak 7b20bb1acc scriptplay: fix time_t=long assumptions
Fixes: https://github.com/karelzak/util-linux/issues/1069
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 10:34:15 +02:00
Karel Zak f02286fd89 lib/pty-session: fix time_t=long assumptions
Fixes: https://github.com/karelzak/util-linux/issues/1069
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 10:22:07 +02:00
Karel Zak 4fb27d5c62 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: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-06 10:13:27 +02:00
Karel Zak d8d54e4bfc 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>
2021-05-05 13:35:30 +02:00
Karel Zak 62009e0d2f tests: update sparc lscpu tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-03 20:30:42 +02:00
Karel Zak 5c09ab260e lscpu: assume L1d, L1i, L2, L3 for sparc
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-03 20:28:30 +02:00
Karel Zak 57fee04c14 lscpu: read Sparc caches files
Fixes: https://github.com/karelzak/util-linux/issues/1296
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-03 16:29:55 +02:00
Karel Zak fcbcb0cdaa meson: fix systemd dependence
Fixes: https://github.com/karelzak/util-linux/issues/1301
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-03 11:10:10 +02:00
Karel Zak 4e56c68abe 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
2021-04-30 13:12:26 +02:00
Armin Begovic ce3355cc54 Fixed wrongful time_t=long assumptions in hwclock.c and timeutils.c 2021-04-29 11:56:37 +00:00
heitbaum 5ec1108c00 build-sys: add configure options to disable individual utils 2021-04-29 08:19:50 +00:00
Karel Zak 071d3135d3 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>
2021-04-28 10:51:07 +02:00
Mario Blättermann 1f54d9cc09 docs/TODO: Minor update and fix typo 2021-04-24 12:20:08 +02:00
Armin Begovic 56702ef2ea Changed int64_t casts to long long int casts 2021-04-23 23:28:37 +02:00
Armin Begovic a937ef8318 Fixed format strings and type casts in hwclock to work with 64-bit time_t on 32-bit linux 2021-04-23 22:48:13 +02:00
Karel Zak b9081962ef 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: da9556a236
Fixes: https://github.com/karelzak/util-linux/issues/1283
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-04-23 13:01:57 +02:00