| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Turned out lsblk is passing null as argument to xstrdup(), so fix that and
add assert() to make sure promise of not returning null is kept in future.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is false positive warning, but lets silence it so that if and when
warnings crop up they are easy to notice and take seriously.
libmount/src/optstr.c:354:29: warning: potential null pointer dereference
[-Wnull-dereference]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
libfdisk/src/context.c:678:7: warning: declaration of ‘rc’ shadows a
previous local [-Wshadow]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Check cols and lines are not NULL only once.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Without #include <stdlib.h>, this configure check fails for strict
C99/C11 compilers which do not support implicit function declarations
(which are a C90 feature removed from C99).
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PKNAME (parent kernel device name) is based on printed tree according
to parent -> child relationship. The tree is optional and not printed
if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old
versions print the PKNAME also in this case.
Addresses: https://github.com/karelzak/util-linux/issues/813
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
|
| |
| |
| |
| |
| |
| | |
Fix a typo in usage introduced in a1a41597bf.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
eval_issue_file() contains fflush(stdout). It comes from an old code that
used fputs() to write to the console.
In the new code, we write to a temporary memstream, and
fclose(ie->output) fully replaces possible fflush(ie->output) in this
implementation.
The new print_issue_file() does not need it as well, as it uses
unbuffered write_all().
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
|
| | |
|
| |
| |
| |
| |
| |
| | |
... no caller in that file, this change has no effect.
This reverts commit 3bb960c7b5f1428f1bff885b2667787e8af5001b.
|
| |
| |
| |
| |
| |
| |
| |
| | |
It's possible that caller has the device already opened for some
other task, so let's reuse the file descriptor.
Requested-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |\
| | |
| | |
| | |
| | | |
* 'su_err_msg' of https://github.com/jhrozek/util-linux:
su: More descriptive error message on malformed user entry
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With users coming from LDAP, it is often the case that the entry in LDAP
does not contain one or more attributes required by su or, because of
misconfigured access control rights, the attribute might not be readable
by the LDAP client. In that case, su just tells the user that the user
does not exist.
It might be more user-friendly to tell the user to check the user entry
for all required fields.
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The device can be inaccessible for non-root user or busy (already used
by another process). In this case it seems better to read information
from /sys.
Note that /sys does not provide struct watchdog_info.options, so we
cannot print list of supported watchdog features.
Addresses: https://github.com/karelzak/util-linux/issues/804
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Let's use miscdev /dev/watchdog as fallback only. We need (if possible)
cdev /dev/watchdog0 as this device has entry in /sys/class/watchdog.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* remove global variables
* keep all together
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Make sure we never return NULL and we reuse the table in code.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This small change improves possibility to modify by script described
PT and use script API in another tools as primary way to create
partitions.
All you need is to compose script by fdisk_script_set_header() and
fdisk_script_set_table() and than apply by fdisk_apply_script().
Requested-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |/ /
| | |
| | |
| | |
| | | |
References: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The file format command line option of losetup was documented and added to the
man page of losetup.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The bash-completion is extended to support the file format option for loop
devices of losetup.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The test checks if the loop device is set up with the specified file format
value from the command line. Other test cases were modified to check the
correct default behaviour of the file format option. By default, the RAW file
format is choosen for a loop device.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While using the new loop kernel module with file format support and an old
losetup without file format support, problems occur. If losetup wants to have
the loop_info structure filled by the loop kernel module, the kernel module
writes across the boundaries of the old structure.
A new flag called LO_FLAGS_FILE_FMT is introduced to specify the support of the
loop_info extension for the file format support. If the flag is set before an
- LOOP_GET_STATUS
- LOOP_GET_STATUS64
- LOOP_SET_STATUS
- LOOP_SET_STATUS64
ioctl call, the caller informs the kernel module about the usage of the extended
loop_info structure. The module cna access the extension. Older versions of
losetup do not set the flag by default and the loop module preserves the
backward compatibility and do not write across the boundaries of the structure.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
|/ /
| |
| |
| |
| |
| |
| | |
losetup can set the file format of each loop device during
creation.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
| |
| |
| |
| | |
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>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|