master - cleanup: update exec_cmd comment and error
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b6437a61806bdec29951eb80616db121c4ec4eff Commit: b6437a61806bdec29951eb80616db121c4ec4eff Parent: 61e7dc833cbcc07453d0e919d52d92290d3ab541 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Aug 6 14:26:00 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Aug 6 16:16:57 2013 +0200
cleanup: update exec_cmd comment and error
Use log_sys_error for reporting error of system call. Fix comment for return value.
--- lib/misc/lvm-exec.c | 2 +- lib/misc/lvm-exec.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
lib/misc/lvm-exec.c +1 -1
@@ -64,7 +64,7 @@ int exec_cmd(struct cmd_context *cmd, const char *const argv[],log_verbose ("Executing:%s" ,_verbose_args (argv, buf,sizeof (buf)));if ((pid =fork ()) ==-1 ) { -log_error ("fork failed: %s" ,strerror (errno)); +log_sys_error ("fork" ,"" );return 0 ; }
lib/misc/lvm-exec.h +1 -1
@@ -32,7 +32,7 @@ struct cmd_context;* Note: You cannot synchronize devices within activation context. * * \return -* 0 (success) or -1 (failure). +* 1 (success) or 0 (failure). */ int exec_cmd (struct cmd_context *cmd,const char *const argv[],int *rstatus,int sync_needed);