Skip to content
Snippets Groups Projects
Select Git revision
  • aebec42ae32f42b65c0ae4a5011c3e63fe5cda41
  • master default protected
  • 72-improve-docs-for_optimal_setup
  • os-path-join
  • develop-GA
  • add-higher-spindown-components
  • v1.3
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

generate_table.py

Blame
  • knowndrives.cpp 29.63 KiB
    /*
     * knowndrives.c
     *
     * Home page of code is: http://smartmontools.sourceforge.net
     * Address of support mailing list: smartmontools-support@lists.sourceforge.net
     *
     * Copyright (C) 2003-4 Philip Williams, Bruce Allen
     *
     * 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.
     *
     */
    
    #include <stdio.h>
    #include "atacmds.h"
    #include "ataprint.h"
    #include "extern.h"
    #include "int64.h"
    #include "knowndrives.h"
    #include "utility.h" // includes <regex.h>
    #include "config.h"
    
    const char *knowndrives_c_cvsid="$Id: knowndrives.cpp,v 1.118 2004/08/21 15:20:39 pjwilliams Exp $"
    ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID UTILITY_H_CVSID;
    
    #define MODEL_STRING_LENGTH                         40
    #define FIRMWARE_STRING_LENGTH                       8
    #define TABLEPRINTWIDTH                             19
    
    // See vendorattributeargs[] array in atacmds.c for definitions.
    #define PRESET_9_MINUTES                   {   9,  1 }
    #define PRESET_9_TEMP                      {   9,  2 }
    #define PRESET_9_SECONDS                   {   9,  3 }
    #define PRESET_9_HALFMINUTES               {   9,  4 }
    #define PRESET_192_EMERGENCYRETRACTCYCLECT { 192,  1 }
    #define PRESET_193_LOADUNLOAD              { 193,  1 }
    #define PRESET_194_10XCELSIUS              { 194,  1 }
    #define PRESET_194_UNKNOWN                 { 194,  2 }
    #define PRESET_198_OFFLINESCANUNCSECTORCT  { 198,  1 }
    #define PRESET_200_WRITEERRORCOUNT         { 200,  1 }
    #define PRESET_201_DETECTEDTACOUNT         { 201,  1 }         
    #define PRESET_220_TEMP                    { 220,  1 }
    
    /* Arrays of preset vendor-specific attribute options for use in
     * knowndrives[]. */
    
    extern int64_t bytes;
    
    // to hold onto exit code for atexit routine
    extern int exitstatus;
    
    // These three are common to several models.
    const unsigned char vendoropts_9_minutes[][2] = {
      PRESET_9_MINUTES,
      {0,0}
    };
    const unsigned char vendoropts_9_halfminutes[][2] = {
      PRESET_9_HALFMINUTES,
      {0,0}
    };
    const unsigned char vendoropts_9_seconds[][2] = {
      PRESET_9_SECONDS,
      {0,0}
    };