smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
os_solaris.h
Go to the documentation of this file.
00001 /*
00002  * os_solaris.h
00003  *
00004  * Home page of code is: http://smartmontools.sourceforge.net
00005  *
00006  * Copyright (C) 2003-8 SAWADA Keiji <smartmontools-support@lists.sourceforge.net>
00007  * Copyright (C) 2003-8 Casper Dik <smartmontools-support@lists.sourceforge.net>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2, or (at your option)
00012  * any later version.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * (for example COPYING); if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  *
00018  * This code was originally developed as a Senior Thesis by Michael Cornwell
00019  * at the Concurrent Systems Laboratory (now part of the Storage Systems
00020  * Research Center), Jack Baskin School of Engineering, University of
00021  * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
00022  *
00023  */
00024 
00025 #ifndef OS_SOLARIS_H_
00026 #define OS_SOLARIS_H_
00027 
00028 #define OS_SOLARIS_H_CVSID "$Id: os_solaris.h 3728 2012-12-13 17:57:50Z chrfranke $\n"
00029 
00030 // Additional material should start here.  Note: to keep the '-V' CVS
00031 // reporting option working as intended, you should only #include
00032 // system include files <something.h>.  Local #include files
00033 // <"something.h"> should be #included in os_solaris.c
00034 
00035 #include <sys/types.h>
00036 #include <sys/stat.h>
00037 #include <fcntl.h>
00038 
00039 // function prototypes for functions defined in os_solaris_ata.s
00040 extern "C" {
00041   int smart_read_data(int fd, void *data);
00042   int smart_read_thresholds(int fd, void *data);
00043   int smart_read_log(int fd, int s, int count, void *data);
00044   int ata_identify(int fd, void *data);
00045   int ata_pidentify(int fd, void *data);
00046   int smart_enable(int fd);
00047   int smart_disable(int fd);
00048   int smart_status(int fd);
00049   int smart_auto_offline(int fd, int s);
00050   int smart_auto_save(int fd, int s);
00051   int smart_immediate_offline(int fd, int s);
00052   int smart_status_check(int fd);
00053 }
00054 
00055 // wrapper macros
00056 #define smart_enable_auto_save(fd)      smart_auto_save(fd, 0xf1)
00057 #define smart_disable_auto_save(fd)     smart_auto_save(fd, 0x00)
00058 
00059 #endif /* OS_SOLARIS_H_ */