Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,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.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; 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.
...@@ -198,7 +198,11 @@ void printandmail(cfgfile *cfg, int which, int priority, char *fmt, ...){ ...@@ -198,7 +198,11 @@ void printandmail(cfgfile *cfg, int which, int priority, char *fmt, ...){
// issue the command to send email // issue the command to send email
status=system(command); status=system(command);
#ifdef WEXITSTATUS
if (WEXITSTATUS(status)) if (WEXITSTATUS(status))
#else
if (status)
#endif
printout(LOG_CRIT,"Email warning message to %s failed (32-bit exit status: %d)\n",address,status); printout(LOG_CRIT,"Email warning message to %s failed (32-bit exit status: %d)\n",address,status);
else { else {
if (which) if (which)
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,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.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; 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.
...@@ -198,7 +198,11 @@ void printandmail(cfgfile *cfg, int which, int priority, char *fmt, ...){ ...@@ -198,7 +198,11 @@ void printandmail(cfgfile *cfg, int which, int priority, char *fmt, ...){
// issue the command to send email // issue the command to send email
status=system(command); status=system(command);
#ifdef WEXITSTATUS
if (WEXITSTATUS(status)) if (WEXITSTATUS(status))
#else
if (status)
#endif
printout(LOG_CRIT,"Email warning message to %s failed (32-bit exit status: %d)\n",address,status); printout(LOG_CRIT,"Email warning message to %s failed (32-bit exit status: %d)\n",address,status);
else { else {
if (which) if (which)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment