| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Hide some false positives.
Note: there must not a be blank line after coverity hiding comment.
|
|
|
|
| |
Add support for specif STATIC_LDFLAGS when linking static binaries.
|
|
|
|
| |
Count with extra 1 byte for buffer end '\0'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With newer kernels (>5.13) DM_CREATE no longer generates
uevent for DM devices without table.
There are even no sysfs block device entries in such case,
although device has asigned major:minor and it is being listed
by 'dmsetup info'.
So this patch calculates amount of 'table' lines and in case
no table line comes from cmdline or stdin - waiting on cookie
is avoided generically instead of disabling just case with
option --notable - which then also skipped handling of an
option --addnodeoncreate (which is however historical and
should be avoided)
As a result there should be no leaking udev cookies and endlessly
waiting commands like this:
dmsetup create mytestdev </dev/null
|
|
|
|
| |
Check errno result from strtoull().
|
|
|
|
|
| |
Before dereference of subcommand pointer, check it's not NULL
as coverity believes there exists theoretical path for this...
|
|
|
|
|
|
| |
Previous patch f853a1bc7afdebb44aeb8c1167e8784d155cad84 enabled
ima measurement unconditionally for every status call,
but it needs to be set only for 'dmsetup measure' command.
|
|
|
|
|
|
|
| |
Add support for DM_IMA_MEASUREMENT_FLAG with
DM_TABLE_STATUS_CMD.
This feature requires DM version 4.45 (5.15+ kernels)
|
|
|
|
| |
There is no 'fd' leak.
|
|
|
|
| |
Mask false-positive leak report.
|
|
|
|
|
|
| |
It's basically irrelavant which value we assing to optarg,
since it's set by getopt() function, but Coverity tool
is incorrectly reporting possibly dereference of NULL.
|
|
|
|
| |
Make obvious to coverity strcmp() is not getting NULL pointer.
|
|
|
|
| |
Better for Coverity to see no change for possibly opened handle.
|
|
|
|
|
| |
Fix leaking memory on error path on _process_losetup_switches().
However real impact is close to zero as dm-loop target isn't really used.
|
|
|
|
|
| |
Use our common patter for reopening FDs to /dev/null
that avoids leaking FD on error path.
|
| |
|
|
|
|
| |
Avoid using lvm header for libdm build.
|
|
|
|
|
| |
Restored 'make cflow' functinality.
Produces some quick referece of function chaining and usage.
|
| |
|
|
|
|
|
| |
These messages do not cause command error - so changing logging level
to just 'sys_debug' (so visible only with -vvvv)
|
|
|
|
|
| |
Show only filename instead of full path name when building
in builddir != srcdir
|
|
|
|
| |
Ensure winsize struct is always defined.
|
|
|
|
|
| |
Follow C norm and do not use 'return' in void function to call other
functions.
|
|
|
|
| |
clang: keep old buf pointer for release on failing realloc() codepath.
|
|
|
|
|
| |
Fix: 889c88e9dab33195efc4dc0400a4b0aaa3383948
Use correct enum DM_DEVICE_GET_TARGET_VERSION.
|
|
|
|
|
|
|
|
| |
Adds support for the DM_GET_TARGET_VERSION to dmsetup.
It introduces a new comman "target-version" that will accept list
of targets and print their version.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
|
|
|
|
|
|
| |
Analogous to the case of a device with no regions, it is not an
error to attempt to list the stats groups on a device that has no
configured groups: just return success and continue.
|
| |
|
|
|
|
|
|
|
| |
Udev debugging is a bit tricky, so to more easily pair cookie ID,
which is the lowest 16 bit - print cookie as hexa number.
This simplify pairing of processed cookies while the 'higher bit flags'
are changed for the same cookie.
|
|
|
|
|
|
|
|
| |
Use the correct loop variable within the loop, instead of reusing the
initial value. Table lines after the first don't get terminated in
the right place.
Signed-off-by: Kurt Garloff <kurt@garloff.de>
|
|
|
|
|
|
|
|
|
|
| |
Since configure.h is a generated header and it's missing traditional
ifdefs preambule - it can be included & parsed multiple times.
Normally compiler is fine when defines have same value and there is
no warning - yet we don't need to parse this several times
and by adding -include directive we can ensure every file
in the package is rightly compile with configure.h as the
first header file.
|
| |
|
|
|
|
|
| |
Dmfilemapd is not using dlopen so doesn't need to be linked with
DL_LIBS.
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure configure.h is always 1st. included header.
Maybe we could eventually introduce gcc -include option, but for now
this better uses dependency tracking.
Also move _REENTRANT and _GNU_SOURCE into configure.h so it
doesn't need to be present in various source files.
This ensures consistent compilation of headers like stdio.h since
it may produce different declaration.
|
| |
|
| |
|
|
|
|
| |
Only single region count is ever replaced with on-stack uint64_t.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the stats handle is neither bound nor listed before the
attempt to call dm_stats_get_nr_regions(), it will always return
zero: this prevents reporting of any dmstats regions on any
device.
Remove the dm_stats_get_nr_regions() check and instead rely on
the correct return status from dm_stats_populate() which only
returns 0 in the case that there are regions to inspect (and
which logs a specific error for all other cases).
Reported-by: Bryan Gurney <bgurney@redhat.com>
|
|
|
|
| |
Add missing check for allocation success.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 3f35146 added a check on the value returned by the
_display_info_cols() function:
1024 if (!_switches[COLS_ARG])
1025 _display_info_long(dmt, &info);
1026 else
1027 r = _display_info_cols(dmt, &info);
1028
1029 return r;
This exposes a bug in the dmstats code in _display_info_cols:
the fact that a device has no regions is explicitly not an error
(and is documented as such in the code), but since the return
code is not changed before leaving the function it is now treated
as an error leading to:
# dmstats list
Command failed.
When no regions exist.
Set the return code to the correct value before returning.
|
|
|
|
|
|
| |
It's important to consistenly include configure.h as the 1st. header.
It containts #defines influencing behavior of other included header
files.
|
|
|
|
| |
No longer uses any lvm code.
|
|
links against libdevmapper again.
no longer includes code from lvm.
|