Data Structures | |
struct | AsyncInfo |
struct | mount_point_s |
Structure for holding mount point information. More... | |
Defines | |
#define | MOUNT_POINT_MAX 256 |
#define | MOUNT_POINT_STRING_SIZE 128 |
Functions | |
void | block_class_visit (ClassDeviceHandler *self, const char *path, struct sysfs_class_device *class_device, dbus_bool_t is_probing) |
char * | strip_space (char *str) |
void | cdrom_check (HalDevice *d, const char *device_file) |
void | force_unmount (HalDevice *d) |
Force unmount of a patition. | |
void | force_unmount_of_all_childs (HalDevice *d) |
Unmount all partitions that stems from this block device. | |
dbus_bool_t | detect_media (HalDevice *d) |
Check for media on a block device that is not a volume. | |
void | block_class_got_udi (ClassDeviceHandler *self, HalDevice *d, const char *udi) |
dbus_bool_t | detect_fs_fat (HalDevice *d) |
void | detect_fs (HalDevice *d) |
void | block_class_pre_process (ClassDeviceHandler *self, HalDevice *d, const char *sysfs_path, struct sysfs_class_device *class_device) |
char * | block_class_compute_udi (HalDevice *d, int append_num) |
void | etc_mtab_process_line (char *s) |
Process a line in /etc/mtab. | |
dbus_bool_t | read_etc_mtab (dbus_bool_t force) |
Reads /etc/mtab and fill out mount_points and num_mount_points variables accordingly. | |
void | sigio_handler (int sig) |
Signal handler for watching /etc. | |
gboolean | foreach_block_device (HalDeviceStore *store, HalDevice *d, gpointer user_data) |
void | etc_mtab_process_all_block_devices (dbus_bool_t force) |
Load /etc/mtab and process all HAL block devices and set properties according to mount status. | |
void | block_class_removed (ClassDeviceHandler *self, const char *sysfs_path, HalDevice *d) |
gboolean | foreach_detect_media (HalDeviceStore *store, HalDevice *device, gpointer user_data) |
void | block_class_tick (ClassDeviceHandler *self) |
void | block_class_detection_done (ClassDeviceHandler *self) |
Variables | |
mount_point_s | mount_points [MOUNT_POINT_MAX] |
Array holding (valid) mount points from /etc/mtab. | |
int | num_mount_points |
Number of elements in mount_points array. | |
int | etc_fd = -1 |
time_t | etc_mtab_mtime = 0 |
Last mtime when /etc/mtab was processed. | |
dbus_bool_t | have_setup_watcher = FALSE |
Global to see if we have setup the watcher on /etc. | |
dbus_bool_t | sigio_etc_changed = FALSE |
Will be set to true by the SIGIO handler. | |
ClassDeviceHandler | block_class_handler |
Method specialisations for block device class. | |
ClassDeviceHandler | block_class_handler |
Method specialisations for block device class. |
|
Definition at line 649 of file block_class_device.c. References class_device_get_major_minor(), detect_media(), find_and_set_physical_device(), get_last_element(), hal_device_add_capability(), parse_dec(), and read_single_line(). |
|
Check for media on a block device that is not a volume.
Definition at line 372 of file block_class_device.c. References force_unmount_of_all_childs(). Referenced by block_class_pre_process(), and foreach_detect_media(). |
|
Load /etc/mtab and process all HAL block devices and set properties according to mount status. Also, optionally, sets up a watcher to do this whenever /etc/mtab changes
Definition at line 1313 of file block_class_device.c. References have_setup_watcher, read_etc_mtab(), and sigio_handler(). |
|
Process a line in /etc/mtab. The given string will be modifed by this function.
Definition at line 1047 of file block_class_device.c. References mount_point_s::major, mount_point_s::minor, mount_points, and num_mount_points. Referenced by read_etc_mtab(). |
|
Force unmount of a patition. Must have block.volume=1 and valid block.device
Definition at line 231 of file block_class_device.c. References device_property_atomic_update_begin(), device_property_atomic_update_end(), and device_send_signal_condition(). Referenced by force_unmount_of_all_childs(). |
|
Unmount all partitions that stems from this block device. Must have block.is_volume==0
Definition at line 311 of file block_class_device.c. References device_send_signal_condition(), and force_unmount(). Referenced by detect_media(). |
|
Definition at line 1369 of file block_class_device.c. References detect_media(). |
|
Reads /etc/mtab and fill out mount_points and num_mount_points variables accordingly. This function holds the file open for further access
Definition at line 1135 of file block_class_device.c. References etc_mtab_mtime, etc_mtab_process_line(), and num_mount_points. Referenced by etc_mtab_process_all_block_devices(). |
|
Signal handler for watching /etc.
Definition at line 1342 of file block_class_device.c. References sigio_etc_changed. Referenced by etc_mtab_process_all_block_devices(). |
|
Initial value: { class_device_init, block_class_detection_done, class_device_shutdown, block_class_tick, class_device_accept, block_class_visit, block_class_removed, class_device_udev_event, class_device_get_device_file_target, block_class_pre_process, class_device_post_merge, block_class_got_udi, block_class_compute_udi, "block", "block", TRUE, FALSE }
Definition at line 1408 of file block_class_device.c. |