Commit 3fd8ed1d authored by chrfranke's avatar chrfranke
Browse files

smartctl: Don't print log directory if '-q errorsonly' is specified.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@3033 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 6738cb76
......@@ -43,6 +43,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] smartctl: Don't print log directory if '-q errorsonly' is specified.
[CF] smartctl: Fix option '-q, --quietmode' (ticket #11).
Regression was introduced with r2807.
......
......@@ -3,8 +3,8 @@
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* Copyright (C) 2002-9 Bruce Allen <smartmontools-support@lists.sourceforge.net>
* Copyright (C) 2008-9 Christian Franke <smartmontools-support@lists.sourceforge.net>
* Copyright (C) 2002-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
* Copyright (C) 2008-10 Christian Franke <smartmontools-support@lists.sourceforge.net>
* Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org>
*
* This program is free software; you can redistribute it and/or modify
......@@ -2076,7 +2076,6 @@ int ataPrintMain (ata_device * device, const ata_print_options & options)
|| options.smart_ext_selftest_log
|| options.sataphy
|| !options.log_requests.empty() ) {
PRINT_ON(con);
if (isGeneralPurposeLoggingCapable(&drive))
pout("General Purpose Logging (GPL) feature set supported\n");
......@@ -2097,31 +2096,26 @@ int ataPrintMain (ata_device * device, const ata_print_options & options)
// Read SMART Log directory
if (need_smart_logdir) {
if (ataReadLogDirectory(device, &smartlogdir_buf, false)){
PRINT_OFF(con);
pout("Read SMART Log Directory failed.\n\n");
failuretest(OPTIONAL_CMD, returnval|=FAILSMART);
}
else
smartlogdir = &smartlogdir_buf;
}
PRINT_ON(con);
// Read GP Log directory
if (need_gp_logdir) {
if (ataReadLogDirectory(device, &gplogdir_buf, true)){
PRINT_OFF(con);
pout("Read GP Log Directory failed.\n\n");
failuretest(OPTIONAL_CMD, returnval|=FAILSMART);
}
else
gplogdir = &gplogdir_buf;
}
PRINT_ON(con);
// Print log directories
if ((options.gp_logdir && gplogdir) || (options.smart_logdir && smartlogdir))
PrintLogDirectories(gplogdir, smartlogdir);
PRINT_OFF(con);
// Print log pages
for (i = 0; i < options.log_requests.size(); i++) {
......
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