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.
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]
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>
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>
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>
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>
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.
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))
| ^~~~~~~~~~~~
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.
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>
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
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
...
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>
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).
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
...