Skip to content
Snippets Groups Projects
Select Git revision
  • 26a7af76efd50783ac1d1a9016d3b3e65aff2868
  • master default
  • trunk
  • RELEASE_6_5_DRIVEDB
  • RELEASE_6_6_DRIVEDB
  • RELEASE_7_0_DRIVEDB
  • RELEASE_7_2_DRIVEDB
  • RELEASE_7_3_DRIVEDB
  • RELEASE_6_0_DRIVEDB
  • RELEASE_6_1_DRIVEDB
  • RELEASE_6_2_DRIVEDB
  • RELEASE_6_3_DRIVEDB
  • RELEASE_6_4_DRIVEDB
  • tags/RELEASE_7_4
  • tags/RELEASE_7_3
  • RELEASE_5_41_DRIVEDB
  • RELEASE_5_42_DRIVEDB
  • RELEASE_5_43_DRIVEDB
  • tags/RELEASE_7_2
  • tags/RELEASE_7_1
  • tags/RELEASE_7_0
  • RELEASE_5_40_DRIVEDB
22 results

smartctl.cpp

Blame
  • smartctl.cpp 9.17 KiB
    /*
     * smartctl.c
     *
     * Home page of code is: http://smartmontools.sourceforge.net
     *
     * Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
     * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 2, or (at your option)
     * 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.
     *
     * This code was originally developed as a Senior Thesis by Michael Cornwell
     * at the Concurrent Systems Laboratory (now part of the Storage Systems
     * Research Center), Jack Baskin School of Engineering, University of
     * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
     *
     */
    
    
    #include <stdio.h>
    #include <unistd.h>
    #include <sys/ioctl.h>
    #include <linux/hdreg.h>
    #include <sys/fcntl.h>
    #include <sys/types.h>
    #include <string.h>
    #include "smartctl.h"
    #include "atacmds.h"
    #include "ataprint.h"
    #include "scsicmds.h"
    #include "scsiprint.h"
    
    extern const char *CVSid1, *CVSid2, *CVSid4, *CVSid5; 
    const char* CVSid6="$Id: smartctl.cpp,v 1.14 2002/10/22 16:49:16 ballen4705 Exp $\n"
    "\t" CVSID1 "\t" CVSID2 "\t" CVSID4 "\t" CVSID5 "\t" CVSID6 ;
    
    unsigned char driveinfo               = FALSE;
    unsigned char checksmart              = FALSE;
    unsigned char smartvendorattrib       = FALSE;
    unsigned char generalsmartvalues      = FALSE;
    unsigned char smartselftestlog        = FALSE;
    unsigned char smarterrorlog           = FALSE;
    unsigned char smartdisable            = FALSE;
    unsigned char smartenable             = FALSE;
    unsigned char smartstatus             = FALSE;
    unsigned char smartexeoffimmediate    = FALSE;
    unsigned char smartshortselftest      = FALSE;
    unsigned char smartextendselftest     = FALSE;
    unsigned char smartshortcapselftest   = FALSE;
    unsigned char smartextendcapselftest  = FALSE;
    unsigned char smartselftestabort      = FALSE;
    unsigned char smartautoofflineenable  = FALSE;
    unsigned char smartautoofflinedisable = FALSE;
    unsigned char smartautosaveenable     = FALSE;
    unsigned char smartautosavedisable    = FALSE;
    unsigned char printcopyleft           = FALSE;
    unsigned char smart009minutes         = FALSE;
    int           testcase                = -1;
    
    
    /*  void Usage (void) 
    	prints help information for command syntax */