Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

Volume Manager Helper
[MNT daemon]

Some helper functions. More...

Functions

int vmh_hal_device_is_safe (const char *udi)
 Check for safe access to device.

int vmh_hal_device_is_volume (const char *udi)
 Check if device is volume.

int vmh_hal_device_is_safe_property (const char *udi, const char *key)
 Check for safe access to property.

int vmh_hal_device_get_safe_property_string (const char *udi, const char *key, char **result)
 Get safe HAL property string.

int vmh_hal_device_get_safe_property_int (const char *udi, const char *key, int *result)
 Get safe HAL property int.

int vmh_hal_device_get_safe_property_double (const char *udi, const char *key, double *result)
 Get safe HAL property double.

int vmh_hal_device_get_safe_property_bool (const char *udi, const char *key, int *result)
 Get safe HAL property bool.

int vmh_try_n_set_volumes_device (PVOLUME pv, const char *udi)
 Helper Set volume device name.

int vmh_try_n_set_volumes_mntpnt (PVOLUME pv, const char *udi)
 Helper Set volume mntpnt.

int vmh_try_n_set_volumes_fstype (PVOLUME pv, const char *udi)
 Helper Set volume fstype.

int vmh_try_n_set_volumes_data (PVOLUME pv, const char *udi)
 Helper Set volumes data.

int vmh_try_n_set_volumes_data_by_property (PVOLUME pv, const char *udi, const char *property)
 Helper Set volumes data for given property.


Detailed Description

Some helper functions.


Function Documentation

int vmh_hal_device_get_safe_property_bool const char *  udi,
const char *  key,
int *  result
 

Get safe HAL property bool.

Parameters:
udi udi of property
key key of property
result pointer to result
Returns:
1 if result valid, 0 otherwise

Definition at line 213 of file mntd_volume_manager_helper.c.

References vmh_hal_device_is_safe_property().

int vmh_hal_device_get_safe_property_double const char *  udi,
const char *  key,
double *  result
 

Get safe HAL property double.

Parameters:
udi udi of property
key key of property
result pointer to result
Returns:
1 if result valid, 0 otherwise

Definition at line 190 of file mntd_volume_manager_helper.c.

References vmh_hal_device_is_safe_property().

int vmh_hal_device_get_safe_property_int const char *  udi,
const char *  key,
int *  result
 

Get safe HAL property int.

Parameters:
udi udi of property
key key of property
result pointer to result
Returns:
1 if result valid, 0 otherwise

Definition at line 167 of file mntd_volume_manager_helper.c.

References vmh_hal_device_is_safe_property().

int vmh_hal_device_get_safe_property_string const char *  udi,
const char *  key,
char **  result
 

Get safe HAL property string.

Parameters:
udi udi of property
key key of property
result pointer to result
Returns:
1 if result valid, 0 otherwise

Definition at line 129 of file mntd_volume_manager_helper.c.

References vmh_hal_device_is_safe_property().

Referenced by vmh_try_n_set_volumes_device(), vmh_try_n_set_volumes_fstype(), and vmh_try_n_set_volumes_mntpnt().

int vmh_hal_device_is_safe const char *  udi  ) 
 

Check for safe access to device.

Parameters:
udi udi of property
Returns:
1 if safe, 0 otherwise

Definition at line 51 of file mntd_volume_manager_helper.c.

Referenced by mntd_volume_manager_rescan(), and vmh_hal_device_is_safe_property().

int vmh_hal_device_is_safe_property const char *  udi,
const char *  key
 

Check for safe access to property.

Parameters:
udi udi of property
key key of property
Returns:
1 if safe, 0 otherwise

Definition at line 103 of file mntd_volume_manager_helper.c.

References vmh_hal_device_is_safe().

Referenced by vmh_hal_device_get_safe_property_bool(), vmh_hal_device_get_safe_property_double(), vmh_hal_device_get_safe_property_int(), vmh_hal_device_get_safe_property_string(), and vmh_hal_device_is_volume().

int vmh_hal_device_is_volume const char *  udi  ) 
 

Check if device is volume.

Parameters:
udi udi of property
Returns:
1 if volume, 0 otherwise

Definition at line 72 of file mntd_volume_manager_helper.c.

References vmh_hal_device_is_safe_property().

Referenced by mntd_volume_manager_add_volume(), and mntd_volume_manager_rescan().

int vmh_try_n_set_volumes_data PVOLUME  pv,
const char *  udi
 

Helper Set volumes data.

Parameters:
pv Pointer to Volume Object
udi udi (key) of object
Returns:
0 if successful, -1 otherwise

Definition at line 367 of file mntd_volume_manager_helper.c.

References vmh_try_n_set_volumes_device(), vmh_try_n_set_volumes_fstype(), and vmh_try_n_set_volumes_mntpnt().

Referenced by mntd_volume_manager_add_volume().

int vmh_try_n_set_volumes_data_by_property PVOLUME  pv,
const char *  udi,
const char *  property
 

Helper Set volumes data for given property.

Parameters:
pv Pointer to Volume Object
udi udi (key) of object
property name of property
Returns:
0 if successful, -1 otherwise

Definition at line 393 of file mntd_volume_manager_helper.c.

References vmh_try_n_set_volumes_device(), vmh_try_n_set_volumes_fstype(), and vmh_try_n_set_volumes_mntpnt().

Referenced by mntd_volume_manager_add_volume_property(), mntd_volume_manager_change_volume_property(), mntd_volume_manager_new_volume_capability(), and mntd_volume_manager_remove_volume_property().

int vmh_try_n_set_volumes_device PVOLUME  pv,
const char *  udi
 

Helper Set volume device name.

Parameters:
pv Pointer to Volume Object
udi udi (key) of object
Returns:
0 if successful, -1 otherwise

Definition at line 235 of file mntd_volume_manager_helper.c.

References MSG_WARNING, and vmh_hal_device_get_safe_property_string().

Referenced by vmh_try_n_set_volumes_data(), and vmh_try_n_set_volumes_data_by_property().

int vmh_try_n_set_volumes_fstype PVOLUME  pv,
const char *  udi
 

Helper Set volume fstype.

Parameters:
pv Pointer to Volume Object
udi udi (key) of object
Returns:
0 if successful, -1 otherwise

Definition at line 323 of file mntd_volume_manager_helper.c.

References MSG_WARNING, and vmh_hal_device_get_safe_property_string().

Referenced by vmh_try_n_set_volumes_data(), and vmh_try_n_set_volumes_data_by_property().

int vmh_try_n_set_volumes_mntpnt PVOLUME  pv,
const char *  udi
 

Helper Set volume mntpnt.

Parameters:
pv Pointer to Volume Object
udi udi (key) of object
Returns:
0 if successful, -1 otherwise

Definition at line 279 of file mntd_volume_manager_helper.c.

References MSG_WARNING, and vmh_hal_device_get_safe_property_string().

Referenced by vmh_try_n_set_volumes_data(), and vmh_try_n_set_volumes_data_by_property().


Generated on Thu May 27 23:27:29 2004 for Mntd by doxygen 1.3.5