smartmontools  SVN Rev 4092
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Namespaces | Macros | Functions | Variables
os_darwin.cpp File Reference
#include <stdbool.h>
#include <errno.h>
#include <unistd.h>
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/mach_init.h>
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/IOReturn.h>
#include <IOKit/IOBSD.h>
#include <IOKit/storage/IOBlockStorageDevice.h>
#include <IOKit/storage/IOStorageDeviceCharacteristics.h>
#include <IOKit/storage/IOMedia.h>
#include <IOKit/storage/ata/IOATAStorageDefines.h>
#include <IOKit/storage/ata/ATASMARTLib.h>
#include <CoreFoundation/CoreFoundation.h>
#include "config.h"
#include "int64.h"
#include "atacmds.h"
#include "scsicmds.h"
#include "utility.h"
#include "os_darwin.h"
#include "dev_interface.h"
Include dependency graph for os_darwin.cpp:

Go to the source code of this file.

Classes

class  os::darwin_smart_device
 Implement shared open/close routines with old functions. More...
 
class  os::darwin_ata_device
 Implement standard ATA support. More...
 
class  os::darwin_smart_interface
 Implement platform interface. More...
 

Namespaces

 os
 

Macros

#define kIOATABlockStorageDeviceClass   "IOATABlockStorageDevice"
 

Functions

static bool os::is_smart_capable (io_object_t dev)
 
static int os::make_device_names (char ***devlist, const char *name)
 
static void os::free_devnames (char **devnames, int numdevs)
 

Variables

const char * os_darwin_cpp_cvsid
 
static const char smartctl_examples []
 
struct {
   io_object_t   ioob
 
   IOCFPlugInInterface **   plugin
 
   IOATASMARTInterface **   smartIf
 
devices [20]
 
const char * dev_darwin_cpp_cvsid
 

Macro Definition Documentation

#define kIOATABlockStorageDeviceClass   "IOATABlockStorageDevice"

Definition at line 37 of file os_darwin.cpp.

Variable Documentation

const char* dev_darwin_cpp_cvsid
Initial value:
= "$Id: os_darwin.cpp 3982 2014-08-16 21:07:19Z samm2 $"
#define DEV_INTERFACE_H_CVSID
Definition: dev_interface.h:21

Definition at line 80 of file os_darwin.cpp.

struct { ... } devices[20]
io_object_t ioob

Definition at line 75 of file os_darwin.cpp.

const char* os_darwin_cpp_cvsid
Initial value:
="$Id: os_darwin.cpp 3982 2014-08-16 21:07:19Z samm2 $"
#define ATACMDS_H_CVSID
Definition: atacmds.h:28
#define INT64_H_CVSID
Definition: int64.h:23
#define SCSICMDS_H_CVSID
Definition: scsicmds.h:35
#define OS_DARWIN_H_CVSID
Definition: os_darwin.h:27
#define UTILITY_H_CVSID
Definition: utility.h:28

Definition at line 48 of file os_darwin.cpp.

IOCFPlugInInterface** plugin

Definition at line 76 of file os_darwin.cpp.

const char smartctl_examples[]
static
Initial value:
=
"=================================================== SMARTCTL EXAMPLES =====\n\n"
" smartctl -a disk0 (Prints all SMART information)\n\n"
" smartctl -t long /dev/disk0 (Executes extended disk self-test)\n\n"
" smartctl -s on -S on /dev/rdisk0 (Enables SMART on first disk)\n\n"
" smartctl -A -l selftest -q errorsonly /dev/disk0\n"
" (Prints Self-Test & Attribute errors)\n\n"
" smartctl -a IOService:/MacRISC2PE/pci@f4000000/AppleMacRiscPCI/ata-6@D/AppleKauaiATA/ATADeviceNub@0/IOATABlockStorageDriver/IOATABlockStorageDevice\n"
" (You can use IOService: ...)\n\n"
" smartctl -c IODeviceTree:/pci@f4000000/ata-6@D/@0:0\n"
" (... Or IODeviceTree:)\n"

Definition at line 52 of file os_darwin.cpp.

IOATASMARTInterface** smartIf

Definition at line 77 of file os_darwin.cpp.