Skip to content
Snippets Groups Projects
Commit a4adb690 authored by (no author)'s avatar (no author)
Browse files

This commit was manufactured by cvs2svn to create branch

'unlabeled-1.106.2'.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/branches/unlabeled-1.106.2@1295 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent b19cf629
No related branches found
No related tags found
No related merge requests found
Showing with 0 additions and 11670 deletions
This diff is collapsed.
This diff is collapsed.
/*
* knowndrives.h
*
* Home page of code is: http://smartmontools.sourceforge.net
* Address of support mailing list: smartmontools-support@lists.sourceforge.net
*
* Copyright (C) 2003 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.
*
*/
#ifndef KNOWNDRIVES_H_
#define KNOWNDRIVES_H_
#define KNOWNDRIVES_H_CVSID "$Id: knowndrives.h,v 1.9 2003/10/12 09:10:03 ballen4705 Exp $\n"
/* Structure used to store settings for specific drives in knowndrives[]. The
* elements are used in the following ways:
*
* modelregexp POSIX regular expression to match the model of a device.
* This should never be NULL (except to terminate the
* knowndrives array).
* firmwareregexp POSIX regular expression to match a devices's firmware
* version. This is optional and should be NULL if it is not
* to be used. If it is non-NULL then it will be used to
* narrow the set of devices matched by modelregexp.
* warningmsg A message that may be displayed for matching drives. For
* example, to inform the user that they may need to apply a
* firmware patch.
* vendoropts Pointer to first element of an array of vendor-specific
* option attribute/value pairs that should be set for a
* matching device unless the user has requested otherwise.
* The user's own settings override these. The array should
* be terminated with the entry {0,0}.
* specialpurpose Pointer to a function that defines some additional action
* that may be taken for matching devices.
* functiondesc A description of the effect of the specialpurpose
* function. Used by showpresets() and showallpresets() to
* make the output more informative.
*/
typedef struct drivesettings_s {
const char * const modelregexp;
const char * const firmwareregexp;
const char * const warningmsg;
const unsigned char (* const vendoropts)[2];
void (* const specialpurpose)(smartmonctrl *);
const char * const functiondesc;
} drivesettings;
/* Table of settings for known drives. Defined in knowndrives.c. */
extern const drivesettings knowndrives[];
// Searches knowndrives[] for a drive with the given model number and firmware
// string.
int lookupdrive(const char *model, const char *firmware);
// Shows the presets (if any) that are available for the given drive.
void showpresets(const struct ata_identify_device *drive);
// Shows all presets for drives in knowndrives[].
void showallpresets(void);
// Sets preset vendor attribute options in opts by finding the entry
// (if any) for the given drive in knowndrives[]. Values that have
// already been set in opts will not be changed. Also sets options in
// con. Returns <0 if drive not recognized else index of drive in
// database.
int applypresets(const struct ata_identify_device *drive, unsigned char **opts,
smartmonctrl *con);
#endif
This diff is collapsed.
This diff is collapsed.
/*
* os_freebsd.h
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* Copyright (C) 2003 Eduard Martinescu <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, 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/
*
*/
#ifndef OS_FREEBSD_H_
#define OS_FREEBSD_H_
#define OS_XXXX_H_CVSID "$Id: os_freebsd.h,v 1.7 2003/10/12 09:10:03 ballen4705 Exp $\n"
struct freebsd_dev_channel {
int channel; // the ATA channel to work with
int device; // the device on the channel
int atacommand; // the ATA Command file descriptor (/dev/ata)
char* devname; // the SCSI device name
int unitnum; // the SCSI unit number
int scsicontrol; // the SCSI control interface
};
#define FREEBSD_MAXDEV 64
#define FREEBSD_FDOFFSET 16;
#define MAX_NUM_DEV 26
#endif /* OS_FREEBSD_H_ */
This diff is collapsed.
This diff is collapsed.
/*
* os_generic.h
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* Copyright (C) 2003 NAME HERE <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, 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/
*
*/
#ifndef OS_GENERIC_H_
#define OS_GENERIC_H_
#define OS_XXXX_H_CVSID "$Id: os_generic.h,v 1.2 2003/10/17 05:17:15 ballen4705 Exp $\n"
// Additional material should start here. Note: to keep the '-V' CVS
// reporting option working as intended, you should only #include
// system include files <something.h>. Local #include files
// <"something.h"> should be #included in os_generic.c
#endif /* OS_GENERIC_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* os_solaris.h
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* Copyright (C) 2003 Casper Dik <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, 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/
*
*/
#ifndef OS_SOLARIS_H_
#define OS_SOLARIS_H_
#define OS_XXXX_H_CVSID "$Id: os_solaris.h,v 1.6 2003/10/26 02:20:40 ballen4705 Exp $\n"
// Additional material should start here. Note: to keep the '-V' CVS
// reporting option working as intended, you should only #include
// system include files <something.h>. Local #include files
// <"something.h"> should be #included in os_solaris.c
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif /* OS_SOLARIS_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment