| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The global filter is applied first, and is also applied in pvscan --cache (which
is called from udev rules to keep lvmetad updated). Cf. example.conf.
|
|
|
|
|
|
|
| |
- move common dm_config_tree manipulation functions from lvmetad-core to
daemon-shared
- add config-tree-based request manipulation APIs to daemon-client
- factor out _v (va_list) variants of most variadic functions in libdaemon
|
| |
|
| |
|
|
|
|
|
| |
Simplifies the code, properly detects too long socket paths,
drops unused parameter.
|
|
|
|
| |
Also check the return value as it meaningless to work with truncated strings.
|
| |
|
|
|
|
| |
Adding (void) where we cannot really report an error.
|
| |
|
| |
|