X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=smartctl.h;h=fee2b66091a5fd77f00c5451ef366485a639fa47;hb=6b80b4d2c7b80037c557bae53e7ff42cfda4a2cb;hp=fca1df20fff8ecd2c4ad1957e955667a91a18458;hpb=cdafb78b23fff3ab7270db93413558e6cf05e2d2;p=mirror_smartmontools-debian.git diff --git a/smartctl.h b/smartctl.h index fca1df2..fee2b66 100644 --- a/smartctl.h +++ b/smartctl.h @@ -1,9 +1,10 @@ /* * smartctl.h * - * Home page of code is: http://smartmontools.sourceforge.net + * Home page of code is: http://www.smartmontools.org * - * Copyright (C) 2002-6 Bruce Allen + * Copyright (C) 2002-10 Bruce Allen + * Copyright (C) 2008-10 Christian Franke * Copyright (C) 2000 Michael Cornwell * * This program is free software; you can redistribute it and/or modify @@ -12,8 +13,8 @@ * any later version. * * You should have received a copy of the GNU General Public License - * (for example COPYING); if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * (for example COPYING); if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This code was originally developed as a Senior Thesis by Michael Cornwell * at the Concurrent Systems Laboratory (now part of the Storage Systems @@ -25,11 +26,7 @@ #ifndef SMARTCTL_H_ #define SMARTCTL_H_ -#define SMARTCTL_H_CVSID "$Id: smartctl.h,v 1.24 2006/07/20 20:59:45 chrfranke Exp $\n" - -/* Boolean Values */ -#define TRUE 0x01 -#define FALSE 0x00 +#define SMARTCTL_H_CVSID "$Id: smartctl.h 4120 2015-08-27 16:12:21Z samm2 $\n" // Return codes (bitmask) @@ -69,9 +66,33 @@ // command set." The 'mandatory' S.M.A.R.T. commands are: (1) // Enable/Disable Attribute Autosave, (2) Enable/Disable S.M.A.R.T., // and (3) S.M.A.R.T. Return Status. All others are optional. -#define OPTIONAL_CMD 1 -#define MANDATORY_CMD 2 - -void print_smartctl_examples(); +enum failure_type { + OPTIONAL_CMD, + MANDATORY_CMD, +}; + +// Globals to set failuretest() policy +extern bool failuretest_conservative; +extern unsigned char failuretest_permissive; + +// Compares failure type to policy in effect, and either exits or +// simply returns to the calling routine. +void failuretest(failure_type type, int returnvalue); + +// Globals to control printing +extern bool printing_is_switchable; +extern bool printing_is_off; + +// Printing control functions +inline void print_on() +{ + if (printing_is_switchable) + printing_is_off = false; +} +inline void print_off() +{ + if (printing_is_switchable) + printing_is_off = true; +} #endif