Commit 192cd175 authored by ballen4705's avatar ballen4705
Browse files

Some systems don't have WEXITSTATUS macro


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@329 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 99598dd6
......@@ -47,7 +47,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.c,v 1.75 2002/11/25 04:48:01 ballen4705 Exp $"
const char *CVSid6="$Id: smartd.c,v 1.76 2002/11/25 11:45:28 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc.
......@@ -198,7 +198,11 @@ void printandmail(cfgfile *cfg, int which, int priority, char *fmt, ...){
// issue the command to send email
status=system(command);
#ifdef WEXITSTATUS
if (WEXITSTATUS(status))
#else
if (status)
#endif
printout(LOG_CRIT,"Email warning message to %s failed (32-bit exit status: %d)\n",address,status);
else {
if (which)
......
......@@ -47,7 +47,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.cpp,v 1.75 2002/11/25 04:48:01 ballen4705 Exp $"
const char *CVSid6="$Id: smartd.cpp,v 1.76 2002/11/25 11:45:28 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc.
......@@ -198,7 +198,11 @@ void printandmail(cfgfile *cfg, int which, int priority, char *fmt, ...){
// issue the command to send email
status=system(command);
#ifdef WEXITSTATUS
if (WEXITSTATUS(status))
#else
if (status)
#endif
printout(LOG_CRIT,"Email warning message to %s failed (32-bit exit status: %d)\n",address,status);
else {
if (which)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment