smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
Public Member Functions | Protected Member Functions | Private Attributes
os_linux::linux_smart_device Class Reference

Shared open/close routines. More...

Collaboration diagram for os_linux::linux_smart_device:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 linux_smart_device (int flags, int retry_flags=-1)
virtual ~linux_smart_device () throw ()
virtual bool is_open () const
 Return true if device is open.
virtual bool open ()
 Open device, return false on error.
virtual bool close ()
 Close device, return false on error.

Protected Member Functions

int get_fd () const
 Return filedesc for derived classes.
void set_fd (int fd)

Private Attributes

int m_fd
 filedesc, -1 if not open.
int m_flags
 Flags for ::open()
int m_retry_flags
 Flags to retry ::open(), -1 if no retry.

Detailed Description

Shared open/close routines.

Definition at line 103 of file os_linux.cpp.


Constructor & Destructor Documentation

os_linux::linux_smart_device::linux_smart_device ( int  flags,
int  retry_flags = -1 
) [inline, explicit]

Definition at line 107 of file os_linux.cpp.

os_linux::linux_smart_device::~linux_smart_device ( ) throw () [virtual]

Definition at line 135 of file os_linux.cpp.


Member Function Documentation

bool os_linux::linux_smart_device::close ( ) [virtual]

Close device, return false on error.

Implements smart_device.

Reimplemented in os_linux::linux_megaraid_device.

Definition at line 178 of file os_linux.cpp.

int os_linux::linux_smart_device::get_fd ( ) const [inline, protected]

Return filedesc for derived classes.

Definition at line 123 of file os_linux.cpp.

bool os_linux::linux_smart_device::is_open ( ) const [virtual]

Return true if device is open.

Implements smart_device.

Definition at line 141 of file os_linux.cpp.

bool os_linux::linux_smart_device::open ( ) [virtual]

Open device, return false on error.

Implements smart_device.

Reimplemented in os_linux::linux_megaraid_device, and os_linux::linux_escalade_device.

Definition at line 146 of file os_linux.cpp.

void os_linux::linux_smart_device::set_fd ( int  fd) [inline, protected]

Definition at line 126 of file os_linux.cpp.


Member Data Documentation

filedesc, -1 if not open.

Reimplemented in os_linux::linux_megaraid_device.

Definition at line 130 of file os_linux.cpp.

Flags for ::open()

Definition at line 131 of file os_linux.cpp.

Flags to retry ::open(), -1 if no retry.

Definition at line 132 of file os_linux.cpp.


The documentation for this class was generated from the following file: