| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reduce cov warning and remove this really ancient define
as lvm2 was never compilable on such platform.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
I wrote dbg_malloc before we had valgrind. These days there's just
no need.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The device-mapper directory now holds a copy of libdm source. At
the moment this code is identical to libdm. Over time code will
migrate out to appropriate places (see doc/refactoring.txt).
The libdm directory still exists, and contains the source for the
libdevmapper shared library, which we will continue to ship (though
not neccessarily update).
All code using libdm should now use the version in device-mapper.
|
|
|
|
|
|
|
| |
As we start refactoring the code to break dependencies (see doc/refactoring.txt),
I want us to use full paths in the includes (eg, #include "base/data-struct/list.h").
This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in
metadata/ from base/
|
| |
|
|
|
|
|
|
|
|
|
| |
Sending %d as format argument in lvmetad_vg_remove_pending() will cause
segfaults in config_make_nodes_v() when va_arg() casts to int64_t. Also, it is
clearly advertised in the lvm source code that using plain %d is prohibited, so
let's switch to FMTd64.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
|
|
|
|
| |
to construct metadata trees
|
|
|
|
| |
dm_config_from_string where needed
|
|
|
|
| |
Some very low-prio warns....
|
| |
|
|
|
|
|
|
| |
Helping with understanding we will not try to deref NULL pointer,
as if the sizes are initialized to NULL it also means 'mem' would
be NULL, but thats too hard to model so make it obvious.
|
|
|
|
|
| |
Don't be too much inventive and shutdown gcc6 warning:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
|
|
|
|
|
| |
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
|
|
|
|
|
| |
Do not let pass %d and print internal error when found one.
Require all users to use FMTd64 - it's seriously confusing.
|
|
|
|
|
|
|
|
|
| |
When lvmetad_pvscan_vg() reads VG metadata from each PV,
it compares it to the last one to verify it matches.
If the VG metadata does not match on the PVs, an error
is printed and it fails to read the VG. In this error
case, use log_debug to show the differences between
the two unmatching copies of the metadata.
|
|
|
|
|
|
| |
Put the change from commit #10d27998b3d2f6100e9e29e83d1d99948c55875f
back so we have working tree again for now. This code needs a bit of
a cleanup to return proper return value to check...
|
| |
|
|
|
|
|
| |
Create a set of wrappers with embedded % such as
#define FMTu64 "%" PRIu64
|
| |
|
|
|
|
| |
so it can be used elsewhere.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Free (and clear) h.protocol string on daemon_open() error paths
so it's OK for caller to skip calling daemon_close() if returned
h.socket_fd is -1.
Close h.socket_fd in daemon_close() to avoid possible leak.
https://bugzilla.redhat.com/1164234
|
|
|
|
|
|
|
|
|
|
| |
Code should not just pass va_list arg through the function
as args could be passed in many strange ways.
Use va_copy().
For details look in i.e.:
http://julipedia.meroh.net/2011/09/using-vacopy-to-safely-pass-ap.html
|
|
|
|
|
|
|
| |
Ensure daemon-io.h is used as a generic header included
with configure defines before other headers.
(In future all lvm2 libraries should settle on a single lib.h header)
Rename couple defines to better match header file names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expected." when communicating with daemon
When we're trying to search for certain tree node
in daemon's reply, we default to a blank string ""
if the node is not found. This happens during lvmetad
initialization.
However, when the default blank string is used, we
can't use dm_config_find_str at the same time - the
dm_config_find_str_allow_empty should be used instead.
Otherwise a a warning message:
"WARNING: Ignoring unsupported value for ..."
is issued.
|
| |
|
|
|
|
|
| |
buffer_write now accepts const pointer
Simplify loops and drop goto when not needed.
|
|
|
|
|
|
|
|
|
| |
Check for enough space in preallocated buffer.
Fixes problem, when lvm code started to suddenly allocate
too big memory chunks.
TODO: lvmetad protocol should announce needed size ahead,
so if metadata have 1MB we are not reallocating memory...
|
|
|
|
| |
Use matching dm_ functions for internally used buffers.
|
|
|
|
|
|
| |
Log all conditions encountered in daemon_open().
Only store errno when known to be set.
|
|
|
|
| |
Detect if dm_config_write_node failed and fail correctly.
|
|
|
|
|
| |
Always clear the response structure.
Simplify daemon_reply initialization.
|
|
|
|
|
|
|
|
| |
Detect failure of dm_pool_strdup() and print error in fail path.
Save one extra strchr call - since we already know the distance
for the '=' character.
Drop stack trace from return after log_error().
|
| |
|
|
|
|
|
|
| |
Destroy interator in error path.
Releasy any possible allocated buffer from buffer_append_f
and buffer_append_vf in error path.
|
|
|
|
|
| |
Set append to NULL in the front of cycle, so the INTERNAL error path
is not leading to double-free of append pointer.
|
|
|
|
| |
Header do not provide any needed symbols.
|
| |
|
|
|
|
|
|
| |
Check result of dm_asprintf
Check buffer_append result
Declare vars in front
|
| |
|
|
|
|
|
|
| |
remove unused vars
move var declarations into the front of functions.
fix some sign warnings
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|