Skip to content
Snippets Groups Projects
Select Git revision
  • d807fa2bc4d0c43481e2949218901fdb06f0752d
  • master default protected
  • improve_Makefile
  • HSA
  • clmathfft
  • longer_dft_support
  • current_fgrp_apps
  • current_brp_apps
8 results

main.cpp

Blame
  • Forked from einsteinathome / libclfft
    Source project has a limited visibility.
    scsiprint.cpp 12.82 KiB
    /*
     * scsiprint.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 <string.h>
    #include <fcntl.h>
    #include <errno.h>
    
    #include "extern.h"
    #include "scsicmds.h"
    #include "scsiprint.h"
    #include "smartctl.h"
    #include "utility.h"
    
    #define GBUF_SIZE 65535
    
    const char* scsiprint_c_cvsid="$Id: scsiprint.cpp,v 1.19 2003/01/16 15:28:57 ballen4705 Exp $"
    EXTERN_H_CVSID SCSICMDS_H_CVSID SCSIPRINT_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID;
    
    // control block which points to external global control variables
    extern atamainctrl *con;
    
    UINT8 gBuf[GBUF_SIZE];
    
    UINT8 gSmartPage = 0;
    UINT8 gTempPage = 0;
    UINT8 gSelfTestPage = 0;
    UINT8 gStartStopPage = 0;
    UINT8 gTapeAlertsPage = 0;
    
    
    
    
    
    void scsiGetSupportPages ( int device)
    {
       int i;
    
       if (logsense ( device , SUPPORT_LOG_PAGES, (UINT8 *) &gBuf) != 0)
       {
           perror ( "Log Sense failed"); 
           exit (1);
       } 
    
       for ( i = 4; i < gBuf[3] + LOGPAGEHDRSIZE ; i++)
       {
          switch ( gBuf[i])