mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
smart_: port to openbsd & macos
This commit is contained in:
parent
6eff786eef
commit
b86f1d0ffe
1 changed files with 4 additions and 1 deletions
|
@ -107,7 +107,10 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close command (this is where we get the exit code! */
|
/* Close command (this is where we get the exit code! */
|
||||||
i = WEXITSTATUS(pclose(f));
|
{
|
||||||
|
int status = pclose(f); /* using an explicit temp var, to be compatible with macos & openbsd */
|
||||||
|
i = WEXITSTATUS(status);
|
||||||
|
}
|
||||||
if (i == 1 || /* smartctl command did not parse */
|
if (i == 1 || /* smartctl command did not parse */
|
||||||
/*i == 2 || *//* smartctl device open failed */
|
/*i == 2 || *//* smartctl device open failed */
|
||||||
i == 127) { /* command not found */
|
i == 127) { /* command not found */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue