Skip to content
Snippets Groups Projects
Commit 7e260dca authored by chrfranke's avatar chrfranke
Browse files

smartctl: Use printf() instead of pout() for exception error

messages to avoid access to bogus 'con->dont_print'.


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2962 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent dddf5112
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,9 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] smartctl: Use printf() instead of pout() for exception error
messages to avoid access to bogus 'con->dont_print'.
[CF] smartd: Add missing help texts for '-A', '-B' and '-s'.
[CF] Add missing check for log page 0x11 support to smartctl
......
......@@ -981,12 +981,12 @@ int main(int argc, char **argv)
}
catch (const std::bad_alloc & /*ex*/) {
// Memory allocation failed (also thrown by std::operator new)
pout("Smartctl: Out of memory\n");
printf("Smartctl: Out of memory\n");
status = FAILCMD;
}
catch (const std::exception & ex) {
// Other fatal errors
pout("Smartctl: Exception: %s\n", ex.what());
printf("Smartctl: Exception: %s\n", ex.what());
status = FAILCMD;
}
return status;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment