Skip to content
Snippets Groups Projects
Commit f72acb6a authored by ballen4705's avatar ballen4705
Browse files

Added some exit status info to error message on failed email.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@249 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent f49cbe92
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
// CVS ID strings // CVS ID strings
extern const char *CVSid1, *CVSid2; extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.c,v 1.58 2002/11/12 22:34:06 ballen4705 Exp $" const char *CVSid6="$Id: smartd.c,v 1.59 2002/11/12 22:35:43 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7; CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc. // global variable used for control of printing, passing arguments, etc.
...@@ -120,7 +120,7 @@ void printandmail(char *address, mailinfo *mail, int priority, char *fmt, ...){ ...@@ -120,7 +120,7 @@ void printandmail(char *address, mailinfo *mail, int priority, char *fmt, ...){
status=system(command); status=system(command);
if (WEXITSTATUS(status)) if (WEXITSTATUS(status))
printout(LOG_CRIT,"Email warning message to %s failed\n",address); printout(LOG_CRIT,"Email warning message to %s failed (exit status %d)\n",address,status);
else else
return; return;
} }
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
// CVS ID strings // CVS ID strings
extern const char *CVSid1, *CVSid2; extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.cpp,v 1.58 2002/11/12 22:34:06 ballen4705 Exp $" const char *CVSid6="$Id: smartd.cpp,v 1.59 2002/11/12 22:35:43 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7; CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc. // global variable used for control of printing, passing arguments, etc.
...@@ -120,7 +120,7 @@ void printandmail(char *address, mailinfo *mail, int priority, char *fmt, ...){ ...@@ -120,7 +120,7 @@ void printandmail(char *address, mailinfo *mail, int priority, char *fmt, ...){
status=system(command); status=system(command);
if (WEXITSTATUS(status)) if (WEXITSTATUS(status))
printout(LOG_CRIT,"Email warning message to %s failed\n",address); printout(LOG_CRIT,"Email warning message to %s failed (exit status %d)\n",address,status);
else else
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment