From f72acb6a5d76c0742ce6d9bb68cdf2bbfb4b9cf6 Mon Sep 17 00:00:00 2001 From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Tue, 12 Nov 2002 22:35:43 +0000 Subject: [PATCH] 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 --- sm5/smartd.c | 4 ++-- sm5/smartd.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sm5/smartd.c b/sm5/smartd.c index 0eb0a2e49..393f25e36 100644 --- a/sm5/smartd.c +++ b/sm5/smartd.c @@ -45,7 +45,7 @@ // CVS ID strings 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; // global variable used for control of printing, passing arguments, etc. @@ -120,7 +120,7 @@ void printandmail(char *address, mailinfo *mail, int priority, char *fmt, ...){ status=system(command); 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 return; } diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp index 3d5de1d3c..ca964127a 100644 --- a/sm5/smartd.cpp +++ b/sm5/smartd.cpp @@ -45,7 +45,7 @@ // CVS ID strings 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; // global variable used for control of printing, passing arguments, etc. @@ -120,7 +120,7 @@ void printandmail(char *address, mailinfo *mail, int priority, char *fmt, ...){ status=system(command); 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 return; } -- GitLab