Petr Rockai
69dda2cfa0
Add rudimentary versioning to the dmevend protocol, allowing us to detect the
...
(protocol) version of the running dmeventd on the client side.
Right now this is only used in dmeventd -R.
2011-04-04 16:11:09 +00:00
Milan Broz
070787d579
Fix some compile warnings on RHEL5
...
- returned char not needed to be explicitly const
- warn if pipe() fails in clvmd (more fixes here needed for error paths...)
- assign (and ignore) read() output in drain buffer
2011-03-01 20:17:56 +00:00
Zdenek Kabelac
41b1b9487c
Remove dead assignment of 'ret' value
...
Variable 'ret' assigned from _do_event() was actually not used and replaced with next
assignment without any read of the returned value.
Code is reformated - so the error path is put in the if() branch and normal
code is put after the 'if' together with FIXME comment.
FIXME lowprio: logging needs to be fixed in this code,
- multiple log_errors are printed, stacks are missing...
2011-01-06 10:45:41 +00:00
Zdenek Kabelac
6c1db4a7d6
Remove unneeded stack prints after log_error
2011-01-06 09:45:05 +00:00
Zdenek Kabelac
adb5fb90b1
Detect errors from dm_task_set calls
...
Check for errors in dm_task_set calls.
Use goto_bad macro with stack trace.
Replace label failed: with bad:.
2010-12-22 15:28:44 +00:00
Zdenek Kabelac
e420410f9a
Fix clang warning for ntohl(*((uint32_t *)buf))
...
We cast (char*) to (uint32_t*) that changes alignment requierements.
For our case the code has been correct as alloca() returns properly
aligned buffer, however this patch make it cleaner and more readable
and avoids warning generation.
2010-10-25 11:57:06 +00:00
Petr Rockai
3cfab15e8a
Implement dmeventd -R, allowing dmeventd to be restarted without losing
...
monitoring state.
2010-10-20 15:12:12 +00:00
Alasdair Kergon
063436c82b
Various small cleanups and fixes related to monitoring.
2010-08-16 22:54:35 +00:00
Alasdair Kergon
59585550a7
Remove superfluous NULL pointer tests before dm_free from dmeventd.
2010-08-16 18:19:46 +00:00
Peter Rajnoha
647d948562
Use UUIDs instead of names while processing event handlers.
...
Internally, we used DM names instead of UUIDs while processing event
handlers. This caused problems while trying to vgrename a VG with active LVs
where the names are being changed and so the devices were not found then.
The patch also contains a little bit of refactoring, moving "build_dlid" code
found in dev_manager.c to "build_dm_uuid", now in lvm-string.c (so we have
build_dm_uuid and build_dm_name at one place).
2010-04-14 13:01:38 +00:00
Zdenek Kabelac
384f2fc38b
Move declaration of struct dm_info info to declaration block.
2010-03-24 11:36:48 +00:00
zkabelac
8c71113cd6
Cleanup gcc warning: null argument where non-null required (arg.2)
...
As the const declaration of execvp is a bit weird, using local
dmeventdpath string.
2010-01-14 10:11:26 +00:00
mpatocka
31b3571d31
Change exit() to _exit() in the child process. exit flushes stdio file buffers,
...
_exit doesn't. If there were some open files, an error in exec and subsequent
exit() would cause the buffers to be flushed twice.
Example:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
int main()
{
printf("buu");
if (!fork()) {
execl("/bin/true-not-exists", "/bin/true", NULL);
exit(1);
}
wait(NULL);
return 0;
}
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com
---
daemons/dmeventd/libdevmapper-event.c | 2 +-
lib/misc/lvm-exec.c | 2 +-
test/harness.c | 3 ++-
tools/dmsetup.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
2009-07-13 21:26:41 +00:00
Milan Broz
dbe275ce72
Do not fork daemon when dmeventd cannot be found.
2009-06-15 12:29:41 +00:00
Alasdair Kergon
af6687405b
more tweaks for dmeventd - not finished yet
2008-11-03 23:01:21 +00:00
Petr Rockai
8c6f96faab
Fix a possible double-free in libdevmapper-event.
2007-11-27 12:26:06 +00:00
Alasdair Kergon
1ad58e1121
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-21 16:26:07 +00:00
Alasdair Kergon
bcb31df10d
Use NULL not 0.
...
Remove worthless comment.
2007-08-05 00:13:02 +00:00
Petr Rockai
eec17858c4
Fix a possible segfault in libdevmapper-event. Thanks to Brian J. Wood
...
for noticing this.
2007-08-02 22:31:59 +00:00
Milan Broz
2e21519a10
Fix libdevmapper-event memory leaks
2007-04-19 19:10:19 +00:00
Alasdair Kergon
a223c3fea3
Improve dmeventd messaging protocol: drain pipe and tag messages.
2007-02-02 17:08:51 +00:00
Alasdair Kergon
63e4217271
Add dm_event_handler_[gs]et_timeout functions.
...
Streamline dm_report_field_* interface.
2007-01-22 15:03:57 +00:00
Alasdair Kergon
44c6c36c43
stat oom_adj and stay silent if it doesn't exist
...
dm_event_handler now keeps private copies of strings
2007-01-17 14:45:10 +00:00
Alasdair Kergon
af13ccddda
more fixes
2007-01-16 23:03:13 +00:00
Alasdair Kergon
392e1bc2e8
more little fixes
2007-01-16 21:13:07 +00:00
Alasdair Kergon
954bd9257b
Add basic reporting functions to libdevmapper.
2007-01-16 18:04:15 +00:00
Alasdair Kergon
01dc83b936
fix recent checkins
2007-01-15 19:47:49 +00:00
Alasdair Kergon
13b234ccba
use DMEVENTD_PATH
2007-01-15 19:11:58 +00:00
Alasdair Kergon
3184ff75c4
More libdevmapper-event interface changes and fixes.
...
Rename dm_saprintf() to dm_asprintf().
2007-01-15 18:21:01 +00:00
Alasdair Kergon
02bf389425
Reinstate dm_event_get_registered_device
2007-01-12 20:22:11 +00:00
Alasdair Kergon
d554b2bc94
Lots of dmeventd-related changes.
2007-01-11 21:54:53 +00:00
Alasdair Kergon
cbdccf0a9c
Lots of dmevent changes.
...
Export dm_basename().
Cope with a trailing space when comparing tables prior to possible reload.
2007-01-08 15:18:52 +00:00
Alasdair Kergon
d031a374f9
Rename _log to dm_log and export.
...
Fix misc compile-time warnings.
2006-01-31 14:50:38 +00:00
Alasdair Kergon
71f2e4306d
Tidy some comments/messages.
2006-01-27 20:52:21 +00:00
Alasdair Kergon
312f866723
some init_client cleanup
2006-01-27 20:49:13 +00:00
Alasdair Kergon
ac8823cdcf
Fix libdevmapper event daemon_running status.
2006-01-27 20:46:06 +00:00
Alasdair Kergon
77565f7ee4
Replace deprecated signal functions.
2006-01-27 20:45:17 +00:00
Alasdair Kergon
cd6568db69
fix dmevent registration return codes
2006-01-27 20:01:45 +00:00
Alasdair Kergon
85c818a39e
read/write loop fixes
2005-12-19 22:56:47 +00:00
Alasdair Kergon
6a22ad0171
comments
2005-12-13 13:34:31 +00:00
Alasdair Kergon
ab931b177d
dmeventd updates
2005-12-02 15:39:16 +00:00