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>
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>
* `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>
* 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>
* '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
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>
* 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>
* '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
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>