smartmontools  SVN Rev 4071
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Namespaces | Macros | Functions | Variables
os_freebsd.cpp File Reference
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <fcntl.h>
#include <err.h>
#include <errno.h>
#include <camlib.h>
#include <cam/scsi/scsi_message.h>
#include <cam/scsi/scsi_pass.h>
#include <sys/ata.h>
#include <sys/stat.h>
#include <unistd.h>
#include <glob.h>
#include <stddef.h>
#include <paths.h>
#include <sys/utsname.h>
#include "config.h"
#include "int64.h"
#include "atacmds.h"
#include "scsicmds.h"
#include "cciss.h"
#include "utility.h"
#include "os_freebsd.h"
#include "dev_interface.h"
#include "dev_ata_cmd_set.h"
#include "dev_areca.h"
#include <dev/usb/usb.h>
#include <dev/usb/usbhid.h>
Include dependency graph for os_freebsd.cpp:

Go to the source code of this file.

Classes

class  os_freebsd::freebsd_smart_device
 Implement shared open/close routines with old functions. More...
 
class  os_freebsd::freebsd_ata_device
 Implement standard ATA support. More...
 
class  os_freebsd::freebsd_escalade_device
 Implement AMCC/3ware RAID support. More...
 
class  os_freebsd::freebsd_highpoint_device
 Implement Highpoint RAID support with old functions. More...
 
class  os_freebsd::freebsd_scsi_device
 Standard SCSI support. More...
 
class  os_freebsd::freebsd_areca_ata_device
 Areca RAID support. More...
 
class  os_freebsd::freebsd_areca_scsi_device
 
class  os_freebsd::freebsd_cciss_device
 Implement CCISS RAID support with old functions. More...
 
class  os_freebsd::freebsd_smart_interface
 Implement platform interface with old functions. More...
 

Namespaces

 os_freebsd
 

Macros

#define USBDEV   "/dev/usb"
 
#define FREEBSDVER   __FreeBSD_kernel_version
 
#define CONTROLLER_3WARE_9000_CHAR   0x01
 
#define CONTROLLER_3WARE_678K_CHAR   0x02
 
#define PATHINQ_SETTINGS_SIZE   128
 
#define NO_RETURN   0
 
#define BAD_SMART   1
 
#define NO_DISK_3WARE   2
 
#define BAD_KERNEL   3
 
#define MAX_MSG   3
 
#define BUFFER_LEN_678K_CHAR   ( sizeof(struct twe_usercommand) )
 
#define BUFFER_LEN_9000_CHAR   ( sizeof(TW_OSLI_IOCTL_NO_DATA_BUF) + sizeof(TWE_Command) )
 
#define TW_IOCTL_BUFFER_SIZE   ( MAX(BUFFER_LEN_678K_CHAR, BUFFER_LEN_9000_CHAR) )
 
#define ATA_DEVICE   "/dev/ata"
 
#define ARGUSED(x)   ((void)(x))
 

Functions

void printwarning (int msgNo, const char *extra)
 
bool os_freebsd::get_dev_names_cam (std::vector< std::string > &names, bool show_all)
 
int os_freebsd::get_dev_names_ata (char ***names)
 
static int os_freebsd::usbdevinfo (int f, int a, int rec, int busno, unsigned short &vendor_id, unsigned short &product_id, unsigned short &version)
 
static int os_freebsd::usbdevlist (int busno, unsigned short &vendor_id, unsigned short &product_id, unsigned short &version)
 

Variables

const char * os_XXXX_c_cvsid
 
long long bytes
 
unsigned char failuretest_permissive
 
unsigned char os_freebsd::m_controller_type
 
unsigned char os_freebsd::m_controller_port
 
static const char os_freebsd::smartctl_examples []
 
static char os_freebsd::done [USB_MAX_DEVICES]
 

Macro Definition Documentation

#define ARGUSED (   x)    ((void)(x))

Definition at line 121 of file os_freebsd.cpp.

#define ATA_DEVICE   "/dev/ata"

Definition at line 118 of file os_freebsd.cpp.

#define BAD_KERNEL   3

Definition at line 84 of file os_freebsd.cpp.

#define BAD_SMART   1

Definition at line 82 of file os_freebsd.cpp.

#define BUFFER_LEN_678K_CHAR   ( sizeof(struct twe_usercommand) )

Definition at line 113 of file os_freebsd.cpp.

#define BUFFER_LEN_9000_CHAR   ( sizeof(TW_OSLI_IOCTL_NO_DATA_BUF) + sizeof(TWE_Command) )

Definition at line 114 of file os_freebsd.cpp.

#define CONTROLLER_3WARE_678K_CHAR   0x02

Definition at line 72 of file os_freebsd.cpp.

#define CONTROLLER_3WARE_9000_CHAR   0x01

Definition at line 71 of file os_freebsd.cpp.

#define FREEBSDVER   __FreeBSD_kernel_version

Definition at line 57 of file os_freebsd.cpp.

#define MAX_MSG   3

Definition at line 85 of file os_freebsd.cpp.

#define NO_DISK_3WARE   2

Definition at line 83 of file os_freebsd.cpp.

#define NO_RETURN   0

Definition at line 81 of file os_freebsd.cpp.

#define PATHINQ_SETTINGS_SIZE   128

Definition at line 75 of file os_freebsd.cpp.

#define TW_IOCTL_BUFFER_SIZE   ( MAX(BUFFER_LEN_678K_CHAR, BUFFER_LEN_9000_CHAR) )

Definition at line 115 of file os_freebsd.cpp.

#define USBDEV   "/dev/usb"

Definition at line 51 of file os_freebsd.cpp.

Function Documentation

void printwarning ( int  msgNo,
const char *  extra 
)

Definition at line 88 of file os_freebsd.cpp.

Variable Documentation

long long bytes

Definition at line 124 of file os_freebsd.cpp.

unsigned char failuretest_permissive

Definition at line 1110 of file smartctl.cpp.

const char* os_XXXX_c_cvsid
Initial value:
="$Id: os_freebsd.cpp 3902 2014-05-23 19:14:15Z samm2 $"
#define ATACMDS_H_CVSID
Definition: atacmds.h:28
#define OS_FREEBSD_H_CVSID
Definition: os_freebsd.h:85
#define INT64_H_CVSID
Definition: int64.h:23
#define SCSICMDS_H_CVSID
Definition: scsicmds.h:35
#define CCISS_H_CVSID
Definition: cciss.h:4
#define UTILITY_H_CVSID
Definition: utility.h:28

Definition at line 78 of file os_freebsd.cpp.