]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
4 years agolibmount: add __format__ attribute
Karel Zak [Fri, 18 Jun 2021 14:34:20 +0000 (16:34 +0200)] 
libmount: add __format__ attribute

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoinclude/strutils: fix __format__attribute
Karel Zak [Fri, 18 Jun 2021 14:33:16 +0000 (16:33 +0200)] 
include/strutils: fix __format__attribute

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoinclude/path: add __format__attribute
Karel Zak [Fri, 18 Jun 2021 14:32:37 +0000 (16:32 +0200)] 
include/path: add __format__attribute

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoinclude/c: add __format__ attribute
Karel Zak [Fri, 18 Jun 2021 14:29:02 +0000 (16:29 +0200)] 
include/c: add __format__ attribute

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: fix lsns test on kernels without USER namespaces
Anatoly Pugachev [Fri, 18 Jun 2021 12:45:31 +0000 (14:45 +0200)] 
tests: fix lsns test on kernels without USER namespaces

Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agomount.8: fix overlayfs nfs_export= indention
Karel Zak [Fri, 18 Jun 2021 12:37:28 +0000 (14:37 +0200)] 
mount.8: fix overlayfs nfs_export= indention

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'man-mount-overlayfs' of https://github.com/iam-TJ/util-linux
Karel Zak [Fri, 18 Jun 2021 10:33:10 +0000 (12:33 +0200)] 
Merge branch 'man-mount-overlayfs' of https://github.com/iam-TJ/util-linux

* 'man-mount-overlayfs' of https://github.com/iam-TJ/util-linux:
  mount: man-page; add all overlayfs options

4 years agoMerge branch 'sys-utils_doc_brackets' of https://github.com/usev6/util-linux
Karel Zak [Fri, 18 Jun 2021 10:30:32 +0000 (12:30 +0200)] 
Merge branch 'sys-utils_doc_brackets' of https://github.com/usev6/util-linux

* 'sys-utils_doc_brackets' of https://github.com/usev6/util-linux:
  Fix some brackets in synopses

4 years agoinclude/strv: fix format attributes
Karel Zak [Fri, 18 Jun 2021 10:25:46 +0000 (12:25 +0200)] 
include/strv: fix format attributes

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoFix some brackets in synopses
Christian Bartolomäus [Thu, 17 Jun 2021 20:27:17 +0000 (22:27 +0200)] 
Fix some brackets in synopses

4 years agomount: man-page; add all overlayfs options
Tj [Thu, 17 Jun 2021 12:13:22 +0000 (13:13 +0100)] 
mount: man-page; add all overlayfs options

The section in man (8) mount for overlay is missing nine options which
aren't documented elsewhere either and are useful features to be aware
of and use.

Fixes #1350.

4 years agobuild-sys: Update configure.ac
Alex Xu [Wed, 16 Jun 2021 13:58:25 +0000 (13:58 +0000)] 
build-sys: Update configure.ac

1. the test incorrectly used AC_COMPILE_IFELSE instead of
   AC_LINK_IFELSE, defeating the purpose of checking -lcrypt.
2. the test did not properly restore LIBS, causing later checks to all
   fail if libcrypt wasn't found.
3. HAVE_LIBCRYPT only controls whether to use -lcrypt, it is not
   needed or used in any source files.

[kzak@redhat.com: - improve commit message
                  - use UL_{SET,RESTORE}_FLAGS() rather than directly
    modify $LIBS]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolib/path: improve ul_path_readlink() to be more robust
Karel Zak [Thu, 17 Jun 2021 11:28:32 +0000 (13:28 +0200)] 
lib/path: improve ul_path_readlink() to be more robust

According to POSIX, readlink() makes no effort to null-terminate buffer
with the result. It seems better to hide this disadvantage in the
ul_path_...() API rather than assume buf[sz] = '\0' everywhere.

Reported-by: Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agomkfs.cramfs: add comment to explain readlink() use
Karel Zak [Thu, 17 Jun 2021 11:26:50 +0000 (13:26 +0200)] 
mkfs.cramfs: add comment to explain readlink() use

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agorename: use readlink() in more robust way
Karel Zak [Thu, 17 Jun 2021 11:25:43 +0000 (13:25 +0200)] 
rename: use readlink() in more robust way

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agonamei: simplify code
Karel Zak [Thu, 17 Jun 2021 11:23:53 +0000 (13:23 +0200)] 
namei: simplify code

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agomore: fix setuid/setgid order
Karel Zak [Thu, 17 Jun 2021 10:21:04 +0000 (12:21 +0200)] 
more: fix setuid/setgid order

The rule is pretty simple, always use setgid() before setuid().

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agohardlink: small regex stuff refactoring
Karel Zak [Wed, 16 Jun 2021 13:48:09 +0000 (15:48 +0200)] 
hardlink: small regex stuff refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agosulogin: add missing ifdefs
Karel Zak [Wed, 16 Jun 2021 13:44:02 +0000 (15:44 +0200)] 
sulogin: add missing ifdefs

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agosulogin: use explicit_bzero() for buffer with password
Karel Zak [Wed, 16 Jun 2021 13:39:32 +0000 (15:39 +0200)] 
sulogin: use explicit_bzero() for buffer with password

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agologin: remove obsolete and confusing comment
Karel Zak [Wed, 16 Jun 2021 13:13:50 +0000 (15:13 +0200)] 
login: remove obsolete and confusing comment

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: add bios_family
Huang Shijie [Tue, 15 Jun 2021 10:06:39 +0000 (10:06 +0000)] 
lscpu: add bios_family

In the arm platform, we do not have the "CPU family" as X86.
In the linux kernel, it is hardcode to set the "CPU architecuture:8"
which should be changed for arm v9 in future.

This patch adds "bios_family" field, which we can get from the DMI table.
In the ampere Altra platform, we can get the new lscpu output:
    ----------------------------------------------------------------
Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          160
On-line CPU(s) list:             0-159
Vendor ID:                       ARM
BIOS Vendor ID:                  Ampere(R)
Model name:                      Neoverse-N1
BIOS Model name:                 Ampere(R) Altra(R) Processor Q00-00 CPU @ 3.0GHz
BIOS CPU family:                 257
Model:                           1
Thread(s) per core:              1
    ----------------------------------------------------------------

[kzak@redhat.com: - s/sprintf/snprintf/]

Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: get the processor information by DMI
Huang Shijie [Tue, 15 Jun 2021 10:06:38 +0000 (10:06 +0000)] 
lscpu: get the processor information by DMI

The patch :367c85c47286 ("lscpu: use SMBIOS tables on ARM for lscpu")
relies on the existence of "/sys/firmware/dmi/entries/4-0/raw",
which may not exist in standard linux kernel.

But "/sys/firmware/dmi/tables/DMI" should exist and can provide the required
processor information.

This patch uses "/sys/firmware/dmi/tables/DMI"
to get the processor information:

Before this patch, in Ampere Altra platform, the lscpu output is:
   ---------------------------------------------
Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          160
On-line CPU(s) list:             0-159
Vendor ID:                       ARM
Model name:                      Neoverse-N1
Model:                           1
Thread(s) per core:              1
Core(s) per socket:              80
Socket(s):                       2
    ........................................
   ---------------------------------------------

After this patch, we can use get the lscpu output
in Ampere Altra platform:
   ---------------------------------------------
Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          160
On-line CPU(s) list:             0-159
Vendor ID:                       ARM
BIOS Vendor ID:                  Ampere(R)
Model name:                      Neoverse-N1
BIOS Model name:                 Ampere(R) Altra(R) Processor Q00-00 CPU @ 3.0GHz
Model:                           1
Thread(s) per core:              1
Core(s) per socket:              80
Socket(s):                       2
    ........................................
   ---------------------------------------------

[kzak@redhat.com: - s/sprintf/snprintf/]

Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: fix and cleanup blkid_safe_string()
Karel Zak [Wed, 16 Jun 2021 08:46:40 +0000 (10:46 +0200)] 
libblkid: fix and cleanup blkid_safe_string()

* Don't use 'size_t len' variable for utf8_encoded_valid_unichar()
  return code as it returns negative numbers on invalid utf8 sequence.

* Don't rely only on \0, but check the current position against output
  buffer size.

* Accept hex encoding like the original version.

* Use else-if to avoid unnecessary 'continue'.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agomkswap: fix holes detection (infinite loop and/or stack-buffer-underflow)
Karel Zak [Tue, 15 Jun 2021 10:04:43 +0000 (12:04 +0200)] 
mkswap: fix holes detection (infinite loop and/or stack-buffer-underflow)

Reported-by: Brian Lane <bcl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877
Fix: https://github.com/karelzak/util-linux/issues/1348
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolib/loopdev: perform retry on EAGAIN
Karel Zak [Tue, 15 Jun 2021 08:34:46 +0000 (10:34 +0200)] 
lib/loopdev: perform retry on EAGAIN

Suggested-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: Optimize the blkid_safe_string() function
Karel Zak [Tue, 15 Jun 2021 08:25:24 +0000 (10:25 +0200)] 
libblkid: Optimize the blkid_safe_string() function

Processing whitespace characters. Allows valid ASCII, valid UTF-8.
Replace everything else with '_'

Co-Author: changlianzhi <changlianzhi@uniontech.com>
Signed-off-by: changlianzhi <changlianzhi@uniontech.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolib/strutils: make test_strutils_normalize() more robust
Karel Zak [Tue, 15 Jun 2021 08:25:06 +0000 (10:25 +0200)] 
lib/strutils: make test_strutils_normalize() more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolib/strutils: improve normalize_whitespace()
Karel Zak [Mon, 14 Jun 2021 14:24:59 +0000 (16:24 +0200)] 
lib/strutils: improve normalize_whitespace()

Let's make it possible to use the function to normalize the string
between two buffers (from source to destination).

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'document-selinux-nosuid' of https://github.com/topimiettinen/util-linux
Karel Zak [Mon, 14 Jun 2021 10:48:08 +0000 (12:48 +0200)] 
Merge branch 'document-selinux-nosuid' of https://github.com/topimiettinen/util-linux

* 'document-selinux-nosuid' of https://github.com/topimiettinen/util-linux:
  mount.8.adoc: document SELinux use of nosuid mount flag

4 years agomount.8.adoc: document SELinux use of nosuid mount flag
Topi Miettinen [Sat, 12 Jun 2021 08:34:36 +0000 (11:34 +0300)] 
mount.8.adoc: document SELinux use of nosuid mount flag

Using mount flag `nosuid` also affects SELinux domain transitions but
this has not been documented well.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
4 years agodmesg: fix indentation in man page
Platon Pronko [Fri, 11 Jun 2021 18:20:58 +0000 (21:20 +0300)] 
dmesg: fix indentation in man page

Double-semicolon at the end of the option line results in description
being indented extra tab to the right. Replacing them with double-colons
allows all options to be displayed at the same indent level.

4 years agolib/path: fix possible leak when use ul_path_read_string() [coverity scan]
Karel Zak [Fri, 11 Jun 2021 13:43:36 +0000 (15:43 +0200)] 
lib/path: fix possible leak when use ul_path_read_string() [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agohwclock: close adjtime on write error [coverity scan]
Karel Zak [Fri, 11 Jun 2021 13:17:42 +0000 (15:17 +0200)] 
hwclock: close adjtime on write error [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agonewgrp: fix memory leak [coverity scan]
Karel Zak [Fri, 11 Jun 2021 13:10:22 +0000 (15:10 +0200)] 
newgrp: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodmesg: fix possible memory leak [coverity scan]
Karel Zak [Thu, 10 Jun 2021 11:44:25 +0000 (13:44 +0200)] 
dmesg: fix possible memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agofindmnt: (verify) fix memory leak [asan]
Karel Zak [Thu, 10 Jun 2021 11:35:05 +0000 (13:35 +0200)] 
findmnt: (verify) fix memory leak [asan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agofindmnt: (verify) fix cache related memory leaks on --nocanonicalize [coverity scan]
Karel Zak [Thu, 10 Jun 2021 11:28:35 +0000 (13:28 +0200)] 
findmnt: (verify) fix cache related memory leaks on --nocanonicalize [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: check for ioctl macro rather than for header file
Karel Zak [Wed, 9 Jun 2021 14:12:13 +0000 (16:12 +0200)] 
libblkid: check for ioctl macro rather than for header file

libblkid/src/probe.c:1012:22: error: ‘BLKGETZONESZ’ undeclared (first use in this function)
 1012 |   if (!ioctl(pr->fd, BLKGETZONESZ, &zone_size_sector))
      |                      ^~~~~~~~~~~~

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: make autogen.sh output more user friendly
Karel Zak [Wed, 9 Jun 2021 14:09:16 +0000 (16:09 +0200)] 
build-sys: make autogen.sh output more user friendly

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: be verbose about missing gettext
Karel Zak [Wed, 9 Jun 2021 13:54:09 +0000 (15:54 +0200)] 
build-sys: be verbose about missing gettext

Reported-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolsblk: sort list of columns
Karel Zak [Wed, 9 Jun 2021 09:09:33 +0000 (11:09 +0200)] 
lsblk: sort list of columns

It's better to maintain sorted list and it's also better for --help output.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolsblk: add column START for partition start offsets
Karel Zak [Wed, 9 Jun 2021 08:57:54 +0000 (10:57 +0200)] 
lsblk: add column START for partition start offsets

Fix: https://github.com/karelzak/util-linux/issues/1340
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: Add hyphens to UUID string representation in Stratis superblock parsing
John Baublitz [Fri, 4 Jun 2021 11:02:39 +0000 (07:02 -0400)] 
libblkid: Add hyphens to UUID string representation in Stratis superblock parsing

[kzak@redhat.com: - small code cleanup]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'fix-display-signed-char' of https://github.com/Ram-Z/util-linux
Karel Zak [Wed, 9 Jun 2021 08:32:23 +0000 (10:32 +0200)] 
Merge branch 'fix-display-signed-char' of https://github.com/Ram-Z/util-linux

* 'fix-display-signed-char' of https://github.com/Ram-Z/util-linux:
  hexdump: correctly display signed single byte integers

4 years agohexdump: correctly display signed single byte integers
Samir Benmendil [Wed, 9 Jun 2021 00:21:46 +0000 (01:21 +0100)] 
hexdump: correctly display signed single byte integers

When using the format string '/1 "%d"', the byte did not display as a
signed integer as expected, it was interpreted as unsigned.

4 years agolsblk: fix formatting in -e option
ratijas [Tue, 8 Jun 2021 16:12:19 +0000 (19:12 +0300)] 
lsblk: fix formatting in -e option

4 years agouclampset: Fix left over optind++
Qais Yousef [Mon, 7 Jun 2021 16:11:11 +0000 (17:11 +0100)] 
uclampset: Fix left over optind++

The code was changed to use ':' in getopt_long() but these were left
over by mistake causing weird random errors when using these options
depending on the order they were fed.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
4 years agorfkill: Set scols table name to make the json output valid
Nicolai Dagestad [Sun, 6 Jun 2021 16:28:35 +0000 (18:28 +0200)] 
rfkill: Set scols table name to make the json output valid

[kzak@redhat.com: - s/rfkill/rfkilldevices/]

Fixes: https://github.com/karelzak/util-linux/issues/1339
Signed-off-by: Nicolai Dagestad <nicolai@dagestad.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibsmartcols: fix bare array on JSON output
Karel Zak [Mon, 7 Jun 2021 08:32:20 +0000 (10:32 +0200)] 
libsmartcols: fix bare array on JSON output

The bare array ({[...]}) for top level list of entries is invalid. It
seems better to print empty string than nothing. This is workaround
for broken utils, better is to define a table name.

Addresses: https://github.com/karelzak/util-linux/issues/1339
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: make re-use of generated man-pages more robust
Karel Zak [Fri, 4 Jun 2021 09:42:03 +0000 (11:42 +0200)] 
build-sys: make re-use of generated man-pages more robust

We need to ignore man-pages at all if not available (not generated
yet), but asciidoctor is not installed.

Fix: https://github.com/karelzak/util-linux/issues/1334
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'nortas' of https://github.com/gyakovlev/util-linux
Karel Zak [Thu, 3 Jun 2021 10:25:35 +0000 (12:25 +0200)] 
Merge branch 'nortas' of https://github.com/gyakovlev/util-linux

* 'nortas' of https://github.com/gyakovlev/util-linux:
  lscpu: fix build on powerpc

4 years agobuild-sys: add generated man-pages to distribution tarball
Karel Zak [Thu, 3 Jun 2021 10:17:27 +0000 (12:17 +0200)] 
build-sys: add generated man-pages to distribution tarball

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: fix build on powerpc
Georgy Yakovlev [Wed, 2 Jun 2021 20:59:26 +0000 (13:59 -0700)] 
lscpu: fix build on powerpc

fails with error: label at end of compound statement
and fix typo as bonus.

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
4 years agobuild-sys: add missing header
Karel Zak [Wed, 2 Jun 2021 13:31:39 +0000 (15:31 +0200)] 
build-sys: add missing header

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolsblk: use ID_MODEL_ENC is possible
Karel Zak [Wed, 2 Jun 2021 11:32:43 +0000 (13:32 +0200)] 
lsblk: use ID_MODEL_ENC is possible

Fix: https://github.com/karelzak/util-linux/issues/1098
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: remove extra blank lines
Karel Zak [Wed, 2 Jun 2021 11:09:28 +0000 (13:09 +0200)] 
lscpu: remove extra blank lines

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'lscpu-json-types' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 2 Jun 2021 11:06:10 +0000 (13:06 +0200)] 
Merge branch 'lscpu-json-types' of https://github.com/t-8ch/util-linux

* 'lscpu-json-types' of https://github.com/t-8ch/util-linux:
  lscpu: use optional json values
  libsmartcols: add support for optional boolean values
  lscpu: use json types

4 years agoMerge branch 'next'
Karel Zak [Wed, 2 Jun 2021 10:33:07 +0000 (12:33 +0200)] 
Merge branch 'next'

* next: (26 commits)
  build-sys: add script to compare config.h from meson and autotools
  meson: add missing header files check
  docs: update TODO
  tests: update lscpu outputs
  lscpu: read MHZ from /sys/.../cpufreq/scaling_cur_freq
  lscpu: use locale-independent strtod() when read from kernel
  lib/c_strtod; add locale independent strtod()
  tests: update lscpu output
  lscpu: use MHZ as number to be locale sensitive
  lscpu: add SCALMHZ% and "CPU scaling MHz:"
  sulogin: fix whitespace error
  sulogin: ignore none-existing console devices
  lsns: fix old error message
  lsns: fix copy & past in man page
  lsns: fill UID and USER columns for interpolated namespaces
  fixup! lsns: interpolate missing namespaces for converting forests to a tree
  lsns: interpolate missing namespaces for converting forests to a tree
  lsns: reorganize members specifying other namespaces in lsns_namespace
  lsns: make namespace having no process printable
  libblkid: support zone reset for wipefs
  ...

4 years agomount: use mnt_fs_is_regularfs()
Karel Zak [Wed, 2 Jun 2021 10:19:06 +0000 (12:19 +0200)] 
mount: use mnt_fs_is_regularfs()

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agofsck: use mnt_fs_is_regularfs()
Karel Zak [Wed, 2 Jun 2021 10:16:14 +0000 (12:16 +0200)] 
fsck: use mnt_fs_is_regularfs()

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibmount: add mnt_fs_is_regularfs() to public API
Karel Zak [Wed, 2 Jun 2021 10:14:10 +0000 (12:14 +0200)] 
libmount: add mnt_fs_is_regularfs() to public API

Fix: https://github.com/karelzak/util-linux/issues/1328
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: fix {release-version} man pages
Karel Zak [Wed, 2 Jun 2021 09:55:44 +0000 (11:55 +0200)] 
build-sys: fix {release-version} man pages

* define {release-version} as $VERSION

* do not use {docdir} in adoc; it's built-in ascidoctor variable
  https://docs.asciidoctor.org/asciidoc/latest/attributes/document-attributes-reference/#intrinsic-attributes

Addresses: https://github.com/karelzak/util-linux/issues/1327
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: install hardlink bash-completion
Karel Zak [Wed, 2 Jun 2021 09:14:36 +0000 (11:14 +0200)] 
build-sys: install hardlink bash-completion

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotools: allow to update specific files on kernel.org
Karel Zak [Tue, 1 Jun 2021 09:45:16 +0000 (11:45 +0200)] 
tools: allow to update specific files on kernel.org

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: fix typo in v2.37-ReleaseNotes
Karel Zak [Tue, 1 Jun 2021 08:37:01 +0000 (10:37 +0200)] 
docs: fix typo in v2.37-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: add uclampset to AUTHORS file
Karel Zak [Tue, 1 Jun 2021 08:31:49 +0000 (10:31 +0200)] 
docs: add uclampset to AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: release++ (v2.37) v2.37
Karel Zak [Tue, 1 Jun 2021 07:52:10 +0000 (09:52 +0200)] 
build-sys: release++ (v2.37)

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: update v2.37-ReleaseNotes
Karel Zak [Tue, 1 Jun 2021 07:46:40 +0000 (09:46 +0200)] 
docs: update v2.37-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: update AUTHORS file
Karel Zak [Tue, 1 Jun 2021 07:45:03 +0000 (09:45 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agopo: merge changes
Karel Zak [Mon, 31 May 2021 16:36:06 +0000 (18:36 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agopo: add ko.po (from translationproject.org)
Seong-ho Cho [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: add ko.po (from translationproject.org)

4 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update uk.po (from translationproject.org)

4 years agopo: update pt.po (from translationproject.org)
Pedro Albuquerque [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update pt.po (from translationproject.org)

4 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update pl.po (from translationproject.org)

4 years agopo: update hr.po (from translationproject.org)
Božidar Putanec [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update hr.po (from translationproject.org)

4 years agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update fr.po (from translationproject.org)

4 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update de.po (from translationproject.org)

4 years agopo: update cs.po (from translationproject.org)
Petr Písař [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update cs.po (from translationproject.org)

4 years agolibblkid: fix docs
Karel Zak [Mon, 31 May 2021 16:16:57 +0000 (18:16 +0200)] 
libblkid: fix docs

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: update copyright years
Karel Zak [Mon, 31 May 2021 16:12:07 +0000 (18:12 +0200)] 
docs: update copyright years

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: remove with-cryptsetup from tools/config-gen.d/all.conf
Karel Zak [Mon, 31 May 2021 15:44:10 +0000 (17:44 +0200)] 
build-sys: remove with-cryptsetup from tools/config-gen.d/all.conf

Unfortunately libtools is not smart enough to link libblkid
dynamically if we link in-tree static libmount.a for libmount tests.
In this case libtools always uses also libblkid.a, but it's problem
for libcryptsetup which requires versioned symbols from libblkid.so

This is no problem for normal binaries, but for libmount tests only
(where we need static library to by-pass public library API).

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: fix NVIDIA ARM hw implementer spelling case
Ville Skyttä [Sun, 30 May 2021 12:14:38 +0000 (15:14 +0300)] 
lscpu: fix NVIDIA ARM hw implementer spelling case

Ref respective vendor sites.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: recognize more ARM implementers
Ville Skyttä [Sun, 30 May 2021 12:13:39 +0000 (15:13 +0300)] 
lscpu: recognize more ARM implementers

Add just the implementer string, no parts yet.

Refs https://developer.arm.com/documentation/ddi0595/2021-03/AArch64-Registers/MIDR-EL1--Main-ID-Register
Refs https://github.com/torvalds/linux/blob/b90e90f40b4ff23c753126008bf4713a42353af6/arch/arm64/include/asm/cputype.h#L54

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
4 years agolscpu: use optional json values
Thomas Weißschuh [Wed, 26 May 2021 11:31:44 +0000 (13:31 +0200)] 
lscpu: use optional json values

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
4 years agolibsmartcols: add support for optional boolean values
Thomas Weißschuh [Wed, 26 May 2021 11:30:31 +0000 (13:30 +0200)] 
libsmartcols: add support for optional boolean values

These default to `null` instead of `false`.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
4 years agolscpu: use json types
Thomas Weißschuh [Wed, 26 May 2021 11:08:16 +0000 (13:08 +0200)] 
lscpu: use json types

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
4 years agopo: add xgettext hint for non-c-format string
Karel Zak [Thu, 27 May 2021 08:39:58 +0000 (10:39 +0200)] 
po: add xgettext hint for non-c-format string

Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: add script to compare config.h from meson and autotools
Karel Zak [Wed, 26 May 2021 11:20:21 +0000 (13:20 +0200)] 
build-sys: add script to compare config.h from meson and autotools

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agomeson: add missing header files check
Karel Zak [Wed, 26 May 2021 11:12:31 +0000 (13:12 +0200)] 
meson: add missing header files check

Fixes: https://github.com/karelzak/util-linux/issues/1318
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: cleanup tab vs. space
Karel Zak [Wed, 26 May 2021 09:54:47 +0000 (11:54 +0200)] 
lscpu: cleanup tab vs. space

Do not mix tab and space in structs initializations.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: Replace space with tabs
Bader Zaidan [Fri, 21 May 2021 22:55:17 +0000 (00:55 +0200)] 
lscpu: Replace space with tabs

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: update TODO
Karel Zak [Tue, 25 May 2021 11:45:24 +0000 (13:45 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: update lscpu outputs
Karel Zak [Tue, 25 May 2021 11:29:20 +0000 (13:29 +0200)] 
tests: update lscpu outputs

4 years agolscpu: read MHZ from /sys/.../cpufreq/scaling_cur_freq
Karel Zak [Tue, 25 May 2021 11:23:39 +0000 (13:23 +0200)] 
lscpu: read MHZ from /sys/.../cpufreq/scaling_cur_freq

This is more portable and provides more stable results than
/proc/cpuinfo.

Fixes: https://github.com/karelzak/util-linux/pull/1317
Co-Author: Thomas Weißschuh
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: use locale-independent strtod() when read from kernel
Karel Zak [Tue, 25 May 2021 09:32:51 +0000 (11:32 +0200)] 
lscpu: use locale-independent strtod() when read from kernel

Reported-by: Thomas Weißschuh
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolib/c_strtod; add locale independent strtod()
Karel Zak [Tue, 25 May 2021 09:31:08 +0000 (11:31 +0200)] 
lib/c_strtod; add locale independent strtod()

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: update lscpu output
Karel Zak [Mon, 24 May 2021 11:43:02 +0000 (13:43 +0200)] 
tests: update lscpu output

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: use MHZ as number to be locale sensitive
Karel Zak [Mon, 24 May 2021 11:19:47 +0000 (13:19 +0200)] 
lscpu: use MHZ as number to be locale sensitive

Fixes: https://github.com/karelzak/util-linux/issues/1316
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: add SCALMHZ% and "CPU scaling MHz:"
Karel Zak [Mon, 24 May 2021 10:24:33 +0000 (12:24 +0200)] 
lscpu: add SCALMHZ% and "CPU scaling MHz:"

$ lscpu
...
  Model name:           Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
    CPU family:         6
    Model:              60
    Thread(s) per core: 2
    Core(s) per socket: 4
    Socket(s):          1
    Stepping:           3
    CPU(s) scaling MHz: 61%
    CPU max MHz:        4400.0000
    CPU min MHz:        800.0000
...

$ lscpu -e=CPU,MAXMHZ,MINMHZ,MHZ,SCALMHZ%
CPU    MAXMHZ   MINMHZ      MHZ SCALMHZ%
  0 4400.0000 800.0000 2800.000      64%
  1 4400.0000 800.0000 4000.146      91%
  2 4400.0000 800.0000 2800.000      64%
  3 4400.0000 800.0000 2800.000      64%
  4 4400.0000 800.0000 2800.000      64%
  5 4400.0000 800.0000 4400.000     100%
  6 4400.0000 800.0000  800.000      18%
  7 4400.0000 800.0000 2800.000      64%

Addresses: https://github.com/karelzak/util-linux/issues/1314
Signed-off-by: Karel Zak <kzak@redhat.com>