Skip to content
Snippets Groups Projects
Select Git revision
  • 8e6b7827339e2d39fb103d8472d45b09a6179c3b
  • master default protected
2 results

RDownScriptalphabeta@tmax.m

Blame
  • Forked from Xisco Jimenez Forteza / RDStackingProject
    Source project has a limited visibility.
    dev_legacy.cpp 19.63 KiB
    /*
     * dev_legacy.cpp
     *
     * Home page of code is: http://smartmontools.sourceforge.net
     *
     * Copyright (C) 2008 Christian Franke <smartmontools-support@lists.sourceforge.net>
     *
     * 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, see <http://www.gnu.org/licenses/>.
     *
     */
    
    #include "config.h"
    #include "int64.h"
    #include "extern.h"
    #include "utility.h"
    #include "atacmds.h"
    #include "scsicmds.h"
    #include "dev_interface.h"
    #include "dev_ata_cmd_set.h"
    
    const char * dev_legacy_cpp_cvsid = "$Id: dev_legacy.cpp,v 1.2 2008/12/18 03:40:05 dlukes Exp $"
      DEV_INTERFACE_H_CVSID;
    
    extern smartmonctrl * con; // con->reportscsiioctl
    
    /////////////////////////////////////////////////////////////////////////////
    
    // Legacy interface declarations (now commented out globally):
    
    // from utility.h:
    int guess_device_type(const char * dev_name);
    int make_device_names (char ***devlist, const char* name);
    int deviceopen(const char *pathname, char *type);
    int deviceclose(int fd);
    #ifdef HAVE_GET_OS_VERSION_STR
    const char * get_os_version_str(void);
    #endif
    
    // from atacmds.h:
    int ata_command_interface(int device, smart_command_set command, int select, char *data);
    int escalade_command_interface(int fd, int escalade_port, int escalade_type, smart_command_set command, int select, char *data);
    int marvell_command_interface(int device, smart_command_set command, int select, char *data);
    int highpoint_command_interface(int device, smart_command_set command, int select, char *data);
    int areca_command_interface(int fd, int disknum, smart_command_set command, int select, char *data);
    #ifdef HAVE_ATA_IDENTIFY_IS_CACHED
    int ata_identify_is_cached(int fd);
    #endif
    
    // from scsicmds.h:
    int do_scsi_cmnd_io(int dev_fd, struct scsi_cmnd_io * iop, int report);
    
    // from smartctl.h:
    void print_smartctl_examples();
    
    /////////////////////////////////////////////////////////////////////////////
    
    namespace os { // No need to publish anything, name provided for Doxygen
    
    /////////////////////////////////////////////////////////////////////////////
    /// Implement shared open/close routines with old functions.
    
    class legacy_smart_device
    : virtual public /*implements*/ smart_device
    {