Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes: https://github.com/util-linux/util-linux/issues/3043
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
github.com:karelzak/util-linux-work
* 'PR/libmount-fix-atime-remount' of github.com:karelzak/util-linux-work:
libmount: Fix atime remount for new API
|
|
* 'libuuid/fix-uuidv6' of https://github.com/t-8ch/util-linux:
libuuid: fix v6 generation
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
get_clock_counter() does not return a gregorian timestamp as required
for v6.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
The second assignment ends up on the linker/libtool commandline,
potentially confusing the tools.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
All atime settings are mutually exclusive, and the attr_set mask for
the mount_setattr() syscall cannot contain multiple MOUNT_ATTR_ atime
related options.
Unfortunately, during a remount, the list of options is composed of
both old and new options. In this case, libmount sets more atime
options to the mask. The correct behavior is to use the last atime
related option from the list.
Fixes: https://github.com/util-linux/util-linux/issues/3032
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 'uuidv7' of https://github.com/t-8ch/util-linux:
uuidgen: add support for RFC9562 UUIDs
uuidparse: add support for RFC9562 UUIDs
libuuid: add support for RFC9562 UUIDs
|
|
* 'pidfd-enosys' of https://github.com/t-8ch/util-linux:
include/pidfd-utils: provide ENOSYS stubs if pidfd functions are missing
|
|
https://github.com/masatake/util-linux
* 'lsfd--use-new-ul_path-functions' of https://github.com/masatake/util-linux:
lsfd: (refactor) use ul_path_statf and ul_path_readlinkf
|
|
Fixes: https://github.com/util-linux/util-linux/issues/3027
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
This allows code which can gracefully fall back to compile.
This should fix the CI on Ubuntu 18.04.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
ul_path_vreadf_buffer already provides zero-termination and newline
trimming, so make use of it.
We now could read more than a single line, but the files this is used on
contain only a single line anyways.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
ul_path_read_buffer already provides zero-termination and newline
trimming, so make use of it.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Based on https://github.com/util-linux/util-linux/pull/3018
The syscall numbers should not be hardcoded in the header file. If we
really need them, there is UL_CHECK_SYSCALL() to define the numbers
for different architectures. I doubt it's really necessary. Just
update your kernel header files to get the latest kernel updates ...
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 'structlceanup' of https://github.com/penguin42/util-linux:
cfdisk: Remove unused struct 'cfdisk_extra'
|
|
* 'fix-column-example' of https://github.com/4KiB/util-linux:
Fix fstab order in `column` manpage example.
|
|
* 'pidfs-pseudo' of https://github.com/YHNdnzj/util-linux:
libmount/utils: add pidfs to pseudo fs list
|
|
* 'mkswap-file' of https://github.com/YHNdnzj/util-linux:
mkswap.8.adoc: update note regarding swapfile creation
|
|
* 'fix' of https://github.com/DaanDeMeyer/util-linux:
Fix ul_path_read_buffer()
|
|
* 'flock-test-doc' of https://github.com/Villemoes/util-linux:
tests: add --fcntl testing to flock
tests: prepare flock for testing --fcntl
flock: document --fcntl
flock: bash-completion: add --fcntl
|
|
https://github.com/jwillikers/util-linux
* 'meson-fix-Python.h-check' of https://github.com/jwillikers/util-linux:
meson: Correctly require the Python.h header for the python dependency
meson: Only require Python module when building pylibmount
meson: Fix build-python option
|
|
https://github.com/masatake/util-linux
* 'lsns--refactor-related-to-2987' of https://github.com/masatake/util-linux:
lsns: (refactor) use ls_path_{openf|statf} to make the code simple
lib/path: add ul_path_statf() and ul_path_vstatf()
lsns: verify the uniqueness of a namespace in ls->namespaces list
lsns: (refactor) make the function names for reading namespaces consistent
lsns: (refactor) rename read_related_namespaces to connect_namespaces
lsns: (refactor) rename get_ns_ino() to get_ns_inos()
lsns: (refactor) use get_{parent|owner}_ns_ino() in add_namespace_for_nsfd
lsns: (refactor) add get_{parent|owner}_ns_ino() implementing some parts of get_ns_ino()
lsns: (refactor) give a enumeration name 'lsns_type' to LSNS_TYPE_ enumerators
lsns: (refactor) rename LSNS_ID_.* to LSNS_TYPE_.*
|
|
'cfdisk_extra' looks unused since it's original commit
(I think because it ended up using libscols instead).
Remove it.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
fstab is:
1. fs_spec
2. fs_file
3. fs_vfstype
4. fs_mntops
5. fs_freq
6. fs_passno
In other words it's:
SOURCE,TARGET,TYPE,OPTIONS,FREQ,PASS
|
|
|
|
Follow-up for 7377b0d99560460806eab9efa9d8224d084c2082
(the addition of --file option)
|
|
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
The current solution to require the Python.h header works around a bug
in Meson that has been fixed for version 1.4.1 of Meson.
Refer to https://github.com/mesonbuild/meson/issues/12862.
This change uses an explicit check for the Python.h include.
This verifies the required header exists.
This check is only necessary prior to version 1.4.1 of Meson.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Only the python executable is required for tests.
Version 1.4.1 of Meson will require the Python.h for find_installation.
This will result in the tests requiring Python.h unnecessarily.
Use find_program to find the Python program for the tests instead.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
The build-python option is for controlling whether or not pylibmount is
built.
Unfortunately, commit b6799cc rendered the option unused.
This change uses the build-python option again.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
The current implementation cuts off the last character of the buffer
if there is no trailing newline.
|
|
All the existing tests are also done with --fcntl in effect, and then
we add one more test, namely that a flock(2) lock can be be obtained
even while a fcntl(2) lock is held - not that anyone should ever need
that, but it does show that the lock types are completely independent.
|
|
Prepare the test script for doing all the same things, but with
--fcntl in effect. The diff is much smaller when viewed with
git show -w.
|
|
I'm not sure how much technical detail/symbolic constants to include
in the explanation.
|
|
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 9b47899495e229ace482afca9e14b9b95ef6fde9)
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
In read_open_ns_inos(), a namespace is added to the list without
verifying its uniqueness in the list.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
read_related_namespaces() itself doesn't read names of new namespaces.
Connecting namespaces for making a tree is the the main job the function.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
The function gets three inode numbers.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
get_ns_ino()
get_ns_ino() returns three inode numbers. The code for the two of three,
inodes for PARENT and USERNS, is moved to the new functions.
So we can reuse the code in other places in lsns.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
* 'PR/libsmartcols-reduce-fix' of github.com:karelzak/util-linux-work:
libsmartcols: fix column reduction
|
|
https://github.com/tasleson/util-linux
* 'bcachefs_correct_max_size_constant' of https://github.com/tasleson/util-linux:
bcachefs: Remove BCACHEFS_SB_MAX_SIZE & check
|
|
* 'lsfd/fcntl' of https://github.com/t-8ch/util-linux:
lsfd: include buffer.h in decode-file-flags.h
buffer: replace include of c.h with stddef.h
lsfd: move interface of decode-file-flags to header
|
|
Functions taking LSNS_ID_ as arguments have .*_lsns_type_.* or
.*_type_.* as parts of their name. This implies the prefix LSNS_TYPE_
is more consistent than LSNS_ID_.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
This constant had an incorrect value. However, the code already
does a max. size check which is correct.
Note: bcachefs can theoretically have a superblock of 32MiB, but
this is very unlikely to happen.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
4013986: libsmartcols: TAB: [0x5626b97f8e10]: #5 reduce stage (width=38, term=1)
4013986: libsmartcols: COL: [0x5626b97f9130]: [01] (null) reduced 2-->18446744073709551615
Fixes: https://github.com/util-linux/util-linux/issues/3003
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
See e.g. https://github.com/containers/bootc/pull/375#issuecomment-1981109022
The phrasing here was in my opinion technically correct but quite confusing and easy to misunderstand.
Let's be very clear:
- The default is *off*
- You can turn it on in two ways
- You can also explicitly turn it off
Signed-off-by: Colin Walters <walters@verbum.org>
|
|
These descriptions are not full sentences and do not end with a period,
so they should not start with a capital either.
(cherry picked from commit 991cb1568a7b3770e33d68c4df49a97068ac8588)
|
|
Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit eeeb3dc9e662c8cf0383fb109bc5e7d2e2fa7a98)
|
|
* 'lsfd/fcntl.h' of https://github.com/t-8ch/util-linux:
lsfd: include linux/fcntl.h
|
|
https://github.com/masatake/util-linux
* 'lsns--debug-ioctl_ns-test-for-master' of https://github.com/masatake/util-linux:
tests: (lsns::ioctl_ns) add more debug print
tests: (lsns::ioctl_ns) record stdout/stderr for debugging the case
|
|
* 'PR/flock-fcntl' of github.com:karelzak/util-linux-work:
flock: add support for using fcntl() with open file description locks
|
|
Co-authored-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Thijs Raymakers <thijs@raymakers.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
Reviewed-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
asm/-headers are implementation details and not meant to be included
directly. Instead use the linux/ header which will always include the
correct asm/-headers.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
buffer.h does not pull in the full c.h with it side-effects,
so it can be used now.
Drop the now unnecessary extern declarations.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
The interface of the buffer library only requires size_t.
It's enough to include stddef.h for that.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Use a proper header file to declare lsfd_decode_file_flags().
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Currently, there is no way for shell scripts to safely access
resources protected by POSIX locking (fcntl with the F_SETLK/F_SETLKW
commands). For example, the glibc function lckpwdf(), used to
protect access to the /etc/shadow database, works by taking a
F_SETLKW on /etc/.pwd.lock .
Due to the odd semantics of POSIX locking (e.g. released when any file
descriptor associated to the inode is closed), we cannot usefully
directly expose the POSIX F_SETLK/F_SETLKW commands. However, linux
3.15 introduced F_OFD_SETLK[W], with semantics wrt. ownership and
release better matching those of flock(2), and crucially they do
conflict with locks obtained via F_SETLK[W]. With this, a shell script
can do
exec 4> /etc/.pwd.lock
flock --fcntl 4
<access/modify /etc/shadow ...>
flock --fcntl --unlock 4 # or just exit
without conflicting with passwd(1) or other utilities that
access/modify /etc/shadow.
No single-letter shorthand is defined for the option, because this is
somewhat low-level and the user really needs to know what he is doing.
Also, this leaves the door open for teaching --fcntl to accept an
optional argument: "ofd", the default, and "posix", should anyone find
a use for flock(1) taking a F_SETLK[W] lock.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit 380120a07154d9447edc703d628416c717493b7d)
|
|
When the test case runs successfully, we expect the case test prints
nothing to stderr. If something is printed to stderr, it helps us
debug lsns command and the test case.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit 82ecf6cf5495f43716fbe9d72411d8bd5994f75d)
|
|
https://github.com/jwillikers/util-linux
* 'meson-more-build-options' of https://github.com/jwillikers/util-linux: (21 commits)
meson: Add build-lsclocks option
meson: Add build-enosys option
meson: Define _DARWIN_C_SOURCE on macOS as is done in Autotools
strutils.h: Include strings.h header for strncasecmp function
xalloc.h: Include stdio.h header for vasprintf function
meson: Fix build by default and install behavior for build-pipesz option
meson: Add build-fadvise option
meson: Add build-scriptlive option
meson: Add build-script option
meson: Require pty for the su and runuser executables
meson: Add have_pty variable to check if pty is available
meson: Add build-blockdev option
meson: Add build-chcpu option
meson: Use has_type instead of sizeof to detect cpu_set_t type
meson: Add build-setarch option
meson: Add build-rtcwake option
meson: Add build-ldattach option
meson: Add build-blkdiscard option
meson: Add build-fsfreeze option
meson: Add build-blkzone option
...
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Add a check to ensure that the linux/audit.h header exists for enosys.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Only build blockdev on Linux.
The BLKROSET macro is used in blockdev.c from blkdev.h.
The blkdev.h header only defines this macro when it is missing on Linux.
Add blockdev to the list of executables, which appears to have been
omitted previously.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
The cpu_set_t type does not exist on macOS.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
The sys/personality.h header does not exist on macOS.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
References: https://github.com/util-linux/util-linux/pull/2988
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 'lsfd' of https://github.com/jwilk-forks/util-linux:
lsfd: (man) add commas between SEE ALSO items
lsfd: (man) fix license name
lsfd: (man) fix typos
|
|
* 'PR/libmount-fix-umount-r' of github.com:karelzak/util-linux-work:
libmount: fix umount --read-only
|
|
* 'PR/lsns-fix-netns' of github.com:karelzak/util-linux-work:
lsns: fix netns use
|
|
* 'PR/libmount-utab-access' of github.com:karelzak/util-linux-work:
libmount: Fix access check for utab in context
|
|
Reported-by: Krzysztof Olędzki <ole@ans.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
# ip netns add vpn
# lsns -T -t net
Segmentation fault (core dumped)
The function interpolate_missing_namespaces() reads data from /proc.
However, in the case of a persistent namespace, there is no procfs
entry for the namespace. Therefore, this function should ignore it.
Fixes: https://github.com/util-linux/util-linux/issues/2982
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The function mnt_has_regular_utab() properly detects that the utab is
not writable, but this is ignored by the high-level context API. As a
result, the library later attempts to update the file and ends up with
a warning in mount(8):
$ mkdir sys
$ unshare --map-root-user --mount
$ mount --rbind /sys sys
$ umount --lazy sys; echo $?
umount: /home/user/sys: filesystem was unmounted, but failed to update userspace mount table.
16
In this case, the utab should be ignored.
Fixes: https://github.com/util-linux/util-linux/issues/2981
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 'typofix' of https://github.com/uudiin/util-linux:
libmount: fix comment typo for mnt_fs_get_comment()
|
|
* 'fix' of https://github.com/DaanDeMeyer/util-linux:
agetty: Don't override TERM passed by the user
|
|
https://github.com/masatake/util-linux
* 'lsns--filter-option-in-usage' of https://github.com/masatake/util-linux:
lsns: add --filter option to the --help optout and the completion rule
|
|
* 'meson-build-dmesg' of https://github.com/jwillikers/util-linux:
meson: Add build-dmesg option
|
|
https://github.com/jwillikers/util-linux
* 'meson-fix-absolute-check' of https://github.com/jwillikers/util-linux:
meson: Use is_absolute to determine if the prefix directory is absolute
|
|
This complicated implementation originated from an early version of
zero-separated items for libsmartcols. It is no longer necessary.
References: https://github.com/util-linux/util-linux/pull/2983
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
|
|
libsmartcols expects it's data fields to be zero terminated.
See the call to strlen() in scols_column_greatest_wrap().
ul_buffer however does not guarantee that termination,
ul_buffer_append_strings() discard the zero-termination.
Always zero-terminate in get_data_col_sources() and drop the now
unnecessary variable "i".
Closes: https://github.com/util-linux/util-linux/issues/2980
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Before 4869b259d68f65ea88df625ce8df9c0177d55a01, any TERM passed
on the agetty command line would be used instead of the default TERM.
After 4869b259d68f65ea88df625ce8df9c0177d55a01, the default TERM is
used unconditionally.
Fix the regression by checking if the user passed a custom TERM.
Fixes: 4869b259d68f65ea88df625ce8df9c0177d55a01
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Require the sys/klog.h header to exist in order to enable the feature.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Meson's check for an absolute path does not work on Windows.
Meson 0.54.0 introduced the fs.is_absolute function.
Use this instead.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
https://github.com/jwillikers/util-linux
* 'meson-fix-build-ipcrm-option' of https://github.com/jwillikers/util-linux:
meson: Require the seminfo type for ipcmk, ipcrm, and ipcs
meson: Add build-ipcmk option
meson: Add missing check for build-ipcrm option
|
|
* 'PR/from-coverity' of github.com:karelzak/util-linux-work:
lslocks: remove deadcode [coverity scan]
hardlink: use xcalloc rather than xmalloc
|
|
* 'uuid/variant' of https://github.com/t-8ch/util-linux:
uuidparse: only report type/version for DCE variant
|
|
* 'PR/fdisk-trim' of github.com:karelzak/util-linux-work:
blkdiscard: (man) add note about fdisk
fdisk: add 'T' command to discard sectors
libfdisk: add fdisk_ask_menu()
fdisk: improve list_freespace()
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
The build-ipcrm option exists in meson_options.txt but has no effect.
Use the option to gate building the ipcrm executable.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
* 'sed' of https://github.com/t-8ch/util-linux:
all_errnos/all_syscalls: use sed to extract defines from headers
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 'PR/libsmartcols-fix-wrap' of github.com:karelzak/util-linux-work:
libsmartcols: (sample) add wrap repeating example
libsmartcols: reset wrap after calculation
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
We currently have blkdiscard(8), but it can be difficult to use for
unpartitioned areas or for partitions when working with a whole-disk
device.
This commit adds BLKDISCARD support to fdisk, so that the user does
not have to specify any range, but instead follows the partition
table.
Addresses: https://github.com/util-linux/util-linux/issues/2804
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Currently, only libfdisk has the ability to prompt the user with a
menu. However, this functionality is not accessible through the public
library API. This commit exports this functionality through the use of
a simple function, fdisk_ask_menu().
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The type/version is only defined in scope for the DCE variant.
From RFC4122 Section 4.1.1:
"the interpretation of all other bits in the UUID depends on the setting
of the bits in the variant field."
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Make the function usable in other dialogs:
* Return a table of the free spaces.
* Return the "best" table entry (to be used as the default in
dialogs).
* Print the order number of entries.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Posix-compliant awk does not seem capable of matching lines and
extracting capture groups of them.
Use sed instead.
Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/util-linux/051624b9256db27a731d62c031cb627d9f5a256e.camel@physik.fu-berlin.de/
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 'lsfd-cmd--dir' of https://github.com/masatake/util-linux:
lsfd: move the source code to new ./lsfd-cmd directory
|
|
* 'getwc' of https://github.com/t-8ch/util-linux:
textutils: introduce and use fgetwc_or_err
treewide: use fgetc() instead of getc()
textutils: use fgetwc() instead of getwc()
|
|
* 'awk' of https://github.com/t-8ch/util-linux:
all_errnos/all_syscalls: don't hardcode AWK invocation
all_errnos/all_syscalls: don't warn during cleanup
all_errnos/all_syscalls: fail if any step fails
|
|
* 'patch-1' of https://github.com/I-use-Arch-btw-00111/util-linux:
(minor) update sulogin.c
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Fixes: https://github.com/util-linux/util-linux/issues/2956
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Use the buildsystem to find a usable awk implementation and use that.
Reported-by: Firas Khalil Khana <firasuke@gmail.com>
Link: https://github.com/util-linux/util-linux/pull/2949
Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
https://lore.kernel.org/util-linux/31ccace2e5912ffc428e065cd66764088c625c4d.camel@physik.fu-berlin.de/
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
On failure the output files may not have been created.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Make the root password prompt more technical
|
|
The special YYerror token is supported in Bison 3.6 and above.
Fortunately, it is possible to emulate this functionality in older
versions as well.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Co-Author: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
In the reentrant parser, we cannot easily extend the argument list for
yylex() using %lex-param. Instead, we must use a lex-extra pointer.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Suggested by ShellCheck.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
major and minor nums
Fixes #2919.
Suggested by Karel Zak <kzak@redhat.com>.
The original code used an obsolete formula to make a device number from
given major and minor numbers.
ts_device_make is a new helper function based on the formula of
__SYSMACROS_DEFINE_MAKEDEV macro defined in
/usr/include/bits/sysmacros.h of GNU libc.
Suggested by Karel Zak <kzak@redhat.com> in #2919.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
* 'pager/less-quirk' of https://github.com/t-8ch/util-linux:
Revert "lib/pager: Apply pager-specific fixes only when needed"
|
|
https://github.com/masatake/util-linux
* 'lslocks--no-sleep-in-test-case' of https://github.com/masatake/util-linux:
lslocks: remove a unused local variable
lslocks: don't abort gathering per-process information even if opening a /proc/[0-9]* fails
|
|
* 'PR/autotools' of github.com:karelzak/util-linux-work:
autotools: add --disable-enosys, check for linux/audit.h
autotools: check for sys/vfs.h and linux/bpf.h
|
|
* 'fix-mnt-update' of https://github.com/gavinhungry/util-linux:
Fix misplaced else in mnt_update_already_done
|
|
https://github.com/jwillikers/util-linux
* 'meson-version-script-libblkid' of https://github.com/jwillikers/util-linux:
meson: Only use the --version-script linker flag where it is supported
|
|
https://github.com/jwillikers/util-linux
* 'meson-fix-libmount-libblkid-feature-dep' of https://github.com/jwillikers/util-linux:
meson: Remove libblkid dependency on libmount
|
|
https://github.com/jwillikers/util-linux
* 'meson-have-sys-vfs-header' of https://github.com/jwillikers/util-linux:
meson: Require the sys/vfs.h header for libmount and fstrim
|
|
* 'zlib-disabler' of https://github.com/jwillikers/util-linux:
meson: Make the zlib dependency a disabler when not found
|
|
* 'tinfo-disabler' of https://github.com/jwillikers/util-linux:
meson: Make ncurses dependency a disabler when not found
meson: Make tinfo dependency a disabler when not found
|
|
Currently, Qemu userspace emulation doesn't support the ioctl cmd.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Qemu userspace emulation reports ENOSYS if it doesn't support a given
ioctl command.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
With the original code, "lsns/filedesc" test case failed on
"build (qemu-user, s390x)" and "build (qemu-user, riscv64)".
On the platforms, lsns_ioctl(fd, NS_GET_{PARENT,USERNS}) failed
with ENOSYS. The error stoped the iteration for gathering
information from /proc/[0-9]+. As a result, lsns printed
nothing. We don't expect this behavior.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
A return value of WEOF of fgetwc() can either mean end-of-file or an
error in errno. The error was ignored and interpreted as end-of-file.
Introduce a new helper that aborts on error and use it in text-utils.
This replaces all calls to plain fgetwc().
Closes #2909
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
fgetc() is similar to getc() but is guaranteed to be a function.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
getwc() has the same semantics as fgetwc() but may be a function or
macro. According to the manpage "there is no reason ever to use it".
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Less is not always detectable, as it can be hidden behind symlinks or
wrapper as for example in a default Debian installation.
Also testing for the literal string "less" does not match full path
specifications like "/usr/bin/less".
Instead always apply the fixes.
This reverts commit c10ad975895372122f72c8d9da089b6ea69f778b.
Closes #2951
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
/proc/[0-9]* fails
If a process ($pid) taking a lock is gone while running lslocks,
gathering per-process information for the process may fail in opening
/proc/$pid. Though lslocks should work with incomplete information,
the original code stopped gathering per-process information for the
other processes.
As a result of the original behavior, tests/ts/lslocks/lslocks really
failed in an environment where multiple test cases ran simultaneously.
Close #2624 again.
See also #2633.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
In the original code, lsns printed nothing if it failed in opening the
last dntry in /proc/[0-9]* though lsns should work partially.
The original behavior caused the combination of the following two
test cases failed:
$ tests/ts/lsns/filter & tests/ts/lsns/ioctl_ns &
[1] 19178
[2] 19179
$ lsns: ownership and hierarchy ... \
lsns: -Q, --filter option ... FAILED
FAILED
[1]- Done tests/ts/lsns/filter
[2]+ Done tests/ts/lsns/ioctl_ns
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
|
|
|
|
|
|
I added this incorrect dependency between libblkid and libmount.
The option to build libblkid should be allowed whether or not the
build-libmount feature is allowed.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
This disables targets that require zlib when it is not found.
Currently, targets requiring zlib are built when it is not found.
Fixes #2930.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
This disables targets that require ncurses when it is not found.
Currently, targets requiring ncurses are built when it is not found.
Fixes #2929.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
This disables targets that require tinfo when it is not found.
Currently, targets requiring tinfo are built when it is not found.
Fixes #2927.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Addresses: https://github.com/util-linux/util-linux/pull/2933
Addresses: https://github.com/util-linux/util-linux/issues/2945
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
See 477401f0de
|