master - lvmpolld: label known return codes
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=333fdfd4b69d04ff94eca644d335567dd70bc589 Commit: 333fdfd4b69d04ff94eca644d335567dd70bc589 Parent: 8d594c409c33884a00be578543589d8207338413 Author: Ondrej Kozina <[email protected]> AuthorDate: Thu May 14 15:53:29 2015 +0200 Committer: Ondrej Kozina <[email protected]> CommitterDate: Fri May 15 20:31:48 2015 +0200
lvmpolld: label known return codes
so that lvmpolld-client can decode and describe these return codes properly
--- daemons/lvmpolld/lvmpolld-core.c | 4 ++-- daemons/lvmpolld/lvmpolld-protocol.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
daemons/lvmpolld/lvmpolld-core.c +2 -2
@@ -397,11 +397,11 @@ static void *fork_and_poll(void *args)if ((dup2 (outfd,STDOUT_FILENO ) !=STDOUT_FILENO ) || (dup2 (errfd,STDERR_FILENO ) !=STDERR_FILENO )) -_exit (100 ); +_exit (LVMPD_RET_DUP_FAILED );execve (*(pdlv->cmdargv), (char *const *)pdlv->cmdargv, (char *const *)pdlv->cmdenvp); -_exit (101 ); +_exit (LVMPD_RET_EXC_FAILED ); }else {/* parent */ if (r ==-1 ) {
daemons/lvmpolld/lvmpolld-protocol.h +3 -0
@@ -46,4 +46,7 @@#define LVMPD_REAS_RETCODE "retcode"/* lvm cmd ret code */ #define LVMPD_REAS_SIGNAL "signal"/* lvm cmd terminating singal */ +#define LVMPD_RET_DUP_FAILED 100 +#define LVMPD_RET_EXC_FAILED 101 +#endif /* _LVM_LVMPOLLD_PROTOCOL_H */