summaryrefslogtreecommitdiff
path: root/libdaemon/client
Commit message (Collapse)AuthorAgeFilesLines
* cov: drop checking for EWOULDBLOCKZdenek Kabelac2020-09-121-2/+0
| | | | | Reduce cov warning and remove this really ancient define as lvm2 was never compilable on such platform.
* headers: use configure.h as 1st. headerZdenek Kabelac2018-12-143-10/+4
| | | | | | | | | | | 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.
* device_mapper: remove dbg_malloc.Joe Thornber2018-06-082-8/+8
| | | | | I wrote dbg_malloc before we had valgrind. These days there's just no need.
* device-mapper: Fork libdm internally.Joe Thornber2018-05-162-2/+2
| | | | | | | | | | | | 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.
* build: Don't generate symlinks in include/ dirJoe Thornber2018-05-145-11/+11
| | | | | | | 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/
* tidy: Add missing underscores to statics.Alasdair G Kergon2017-10-181-2/+2
|
* lvmetad: fix segfault on i386Christian Brauner2017-03-131-1/+1
| | | | | | | | | 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>
* config: use config_tree_from_string_without_dup_node_check throughout code ↵Peter Rajnoha2016-09-211-1/+1
| | | | to construct metadata trees
* config: add config_tree_from_string_without_dup_node_check to replace ↵Peter Rajnoha2016-09-212-0/+17
| | | | dm_config_from_string where needed
* coverity: cleaning some PW.NOT_COMPATIBLE_WITH_PREVIOUS_DECLZdenek Kabelac2016-07-132-2/+2
| | | | Some very low-prio warns....
* cleanup: add backtraceZdenek Kabelac2016-03-101-10/+8
|
* coverity: helping coverity with NULL pointerZdenek Kabelac2016-02-261-2/+2
| | | | | | 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.
* gcc: logical-op warning go awayZdenek Kabelac2016-02-231-4/+6
| | | | | Don't be too much inventive and shutdown gcc6 warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
* doc: change fsf addressZdenek Kabelac2016-01-217-7/+7
| | | | | Hmm rpmlint suggest fsf is using a different address these days, so lets keep it up-to-date
* libdaemon: prohibit use of %d for 64bit numbresZdenek Kabelac2015-11-091-1/+6
| | | | | Do not let pass %d and print internal error when found one. Require all users to use FMTd64 - it's seriously confusing.
* lockd: add debug logging for metadata errorDavid Teigland2015-09-292-1/+2
| | | | | | | | | 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.
* libdaemon: config_make_nodes_v needs fixingPeter Rajnoha2015-07-091-0/+4
| | | | | | 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...
* include: Standardise around new tool.h.Alasdair G Kergon2015-07-066-25/+12
|
* macros: Wrap PRI with FMT.Alasdair G Kergon2015-07-061-2/+3
| | | | | Create a set of wrappers with embedded % such as #define FMTu64 "%" PRIu64
* Add lvmlockddev-dct-lvmlockd-AZDavid Teigland2015-07-021-3/+13
|
* libdaemon: move compare_config to libDavid Teigland2015-06-172-0/+59
| | | | so it can be used elsewhere.
* libdaemon: Export chain_node from config-utils.c.Petr Rockai2015-04-142-3/+7
|
* cleanup: drop unused valZdenek Kabelac2015-02-171-6/+0
|
* libdaemon: Use select to yield CPU on a blocked read or write.Petr Rockai2015-02-051-5/+22
|
* libdaemon: Fix some client leaks.Alasdair G Kergon2014-11-282-10/+27
| | | | | | | | | | 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
* va_list: properly pass va_list through functionsZdenek Kabelac2014-09-161-4/+12
| | | | | | | | | | 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
* libdaemon: header cleanupZdenek Kabelac2014-04-186-16/+12
| | | | | | | 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.
* libdaemon: fix misleading "WARNING: Ignoring unsupported value for ↵Peter Rajnoha2014-03-241-1/+1
| | | | | | | | | | | | | | | | | | 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.
* libdaemon: Fix an invalid memory read.Petr Rockai2013-10-081-1/+1
|
* cleanup: easier to read loop codeZdenek Kabelac2013-06-182-38/+29
| | | | | buffer_write now accepts const pointer Simplify loops and drop goto when not needed.
* lvmetad: fix compare functionZdenek Kabelac2013-06-181-1/+1
| | | | | | | | | 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...
* lvmetad: use dm_ malloc wrappersZdenek Kabelac2013-06-181-1/+1
| | | | Use matching dm_ functions for internally used buffers.
* libdaemon: add logging to daemon_openAlasdair G Kergon2013-01-041-8/+28
| | | | | | Log all conditions encountered in daemon_open(). Only store errno when known to be set.
* lvmetad: add check for failure dm_config_write_nodeZdenek Kabelac2012-12-151-1/+4
| | | | Detect if dm_config_write_node failed and fail correctly.
* lvmetad: keep returned struct fully initializedZdenek Kabelac2012-12-151-3/+3
| | | | | Always clear the response structure. Simplify daemon_reply initialization.
* libdaemon: check for strdup resultZdenek Kabelac2012-12-151-6/+11
| | | | | | | | 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().
* lvmetad: fix leak of append on error pathZdenek Kabelac2012-10-141-1/+1
|
* lvmetad: fix memory leaks in error pathsZdenek Kabelac2012-10-131-3/+4
| | | | | | Destroy interator in error path. Releasy any possible allocated buffer from buffer_append_f and buffer_append_vf in error path.
* lvmetad: move initialization in the inner loopZdenek Kabelac2012-10-131-1/+2
| | | | | Set append to NULL in the front of cycle, so the INTERNAL error path is not leading to double-free of append pointer.
* cleanup: remove unneeded headersZdenek Kabelac2012-10-131-1/+0
| | | | Header do not provide any needed symbols.
* lvmetad: fix test for dm_asprintfZdenek Kabelac2012-10-121-4/+4
|
* lvmetad: validate dm_asprintf in buffer_append_vfZdenek Kabelac2012-10-121-13/+20
| | | | | | Check result of dm_asprintf Check buffer_append result Declare vars in front
* lvmetad: check result of buffer_reallocZdenek Kabelac2012-10-121-2/+3
|
* cleanup: fix compiler warningsZdenek Kabelac2012-10-122-10/+24
| | | | | | remove unused vars move var declarations into the front of functions. fix some sign warnings
* libdaemon: Make buffer handling asymptotically more efficient.Petr Rockai2012-10-116-83/+107
|
* libdaemon-client: Fix a memory leak in daemon_send.Petr Rockai2012-10-081-4/+8
|
* libdaemon: Split daemon-shared.[hc] into daemon-io.[hc] and config-util.[hc].Petr Rockai2012-09-266-90/+136
|
* libdaemonclient: Use log_sys_error in place of perror.Petr Rockai2012-09-261-1/+1
|
* libdaemonclient: Use dm_{malloc,free} in place of {malloc,free}.Petr Rockai2012-09-261-3/+2
|
* lvmetad: Fix #845269: SEGV on corrupt lvmetad response.Petr Rockai2012-09-261-0/+2
|