Data Structures | |
struct | IconMappingEntry_s |
struct | LibHalStoragePolicy_s |
struct | LibHalDrive_s |
struct | LibHalVolume_s |
Defines | |
#define | MAX_STRING_SZ 256 |
#define | MOUNT_OPTIONS_SIZE 256 |
#define | LIBHAL_PROP_EXTRACT_BEGIN if (FALSE) |
#define | LIBHAL_PROP_EXTRACT_END ; |
#define | LIBHAL_PROP_EXTRACT_INT(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == LIBHAL_PROPERTY_TYPE_INT32) _where_ = libhal_psi_get_int (&it) |
#define | LIBHAL_PROP_EXTRACT_STRING(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == LIBHAL_PROPERTY_TYPE_STRING) _where_ = (libhal_psi_get_string (&it) != NULL && strlen (libhal_psi_get_string (&it)) > 0) ? strdup (libhal_psi_get_string (&it)) : NULL |
#define | LIBHAL_PROP_EXTRACT_BOOL(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == LIBHAL_PROPERTY_TYPE_BOOLEAN) _where_ = libhal_psi_get_bool (&it) |
#define | LIBHAL_PROP_EXTRACT_BOOL_BITFIELD(_property_, _where_, _field_) else if (strcmp (key, _property_) == 0 && type == LIBHAL_PROPERTY_TYPE_BOOLEAN) _where_ |= libhal_psi_get_bool (&it) ? _field_ : 0 |
#define | LIBHAL_PROP_EXTRACT_STRLIST(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == LIBHAL_PROPERTY_TYPE_STRLIST) _where_ = my_strvdup (libhal_psi_get_strlist (&it)) |
#define | strcat_len(dst, src, dstmaxlen) |
Typedefs | |
typedef IconMappingEntry_s | IconMappingEntry |
typdef of IconMappingEntry_s | |
Functions | |
LibHalStoragePolicy * | libhal_storage_policy_new () |
void | libhal_storage_policy_free (LibHalStoragePolicy *policy) |
void | libhal_storage_policy_set_icon_path (LibHalStoragePolicy *policy, LibHalStoragePolicyIcon icon, const char *path) |
void | libhal_storage_policy_set_icon_mapping (LibHalStoragePolicy *policy, LibHalStoragePolicyIconPair *pairs) |
const char * | libhal_storage_policy_lookup_icon (LibHalStoragePolicy *policy, LibHalStoragePolicyIcon icon) |
char * | libhal_volume_policy_compute_size_as_string (LibHalVolume *volume) |
static void | fixup_string (char *s) |
char * | libhal_drive_policy_compute_display_name (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
char * | libhal_volume_policy_compute_display_name (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
char * | libhal_drive_policy_compute_icon_name (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
char * | libhal_volume_policy_compute_icon_name (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
dbus_bool_t | libhal_volume_policy_should_be_visible (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy, const char *target_mount_point) |
Policy function to determine if a volume should be visible in a desktop environment. | |
const char * | libhal_drive_get_dedicated_icon_drive (LibHalDrive *drive) |
const char * | libhal_drive_get_dedicated_icon_volume (LibHalDrive *drive) |
void | libhal_drive_free (LibHalDrive *drive) |
Free all resources used by a LibHalDrive object. | |
void | libhal_volume_free (LibHalVolume *vol) |
Free all resources used by a LibHalVolume object. | |
static char ** | my_strvdup (char **strv) |
LibHalDrive * | libhal_drive_from_udi (LibHalContext *hal_ctx, const char *udi) |
Given a UDI for a HAL device of capability 'storage', this function retrieves all the relevant properties into convenient in-process data structures. | |
const char * | libhal_volume_get_storage_device_udi (LibHalVolume *volume) |
const char * | libhal_drive_get_physical_device_udi (LibHalDrive *drive) |
dbus_bool_t | libhal_drive_requires_eject (LibHalDrive *drive) |
LibHalVolume * | libhal_volume_from_udi (LibHalContext *hal_ctx, const char *udi) |
Given a UDI for a LIBHAL device of capability 'volume', this function retrieves all the relevant properties into convenient in-process data structures. | |
int | libhal_volume_get_msdos_part_table_type (LibHalVolume *volume) |
If the volume is on a drive with a MSDOS style partition table, return the partition table id. | |
LibHalDrive * | libhal_drive_from_device_file (LibHalContext *hal_ctx, const char *device_file) |
Get the drive object that either is (when given e.g. | |
LibHalVolume * | libhal_volume_from_device_file (LibHalContext *hal_ctx, const char *device_file) |
Get the volume object for a given device file. | |
dbus_uint64_t | libhal_volume_get_size (LibHalVolume *volume) |
dbus_bool_t | libhal_drive_is_hotpluggable (LibHalDrive *drive) |
dbus_bool_t | libhal_drive_uses_removable_media (LibHalDrive *drive) |
LibHalDriveType | libhal_drive_get_type (LibHalDrive *drive) |
LibHalDriveBus | libhal_drive_get_bus (LibHalDrive *drive) |
LibHalDriveCdromCaps | libhal_drive_get_cdrom_caps (LibHalDrive *drive) |
unsigned int | libhal_drive_get_device_major (LibHalDrive *drive) |
unsigned int | libhal_drive_get_device_minor (LibHalDrive *drive) |
const char * | libhal_drive_get_type_textual (LibHalDrive *drive) |
const char * | libhal_drive_get_device_file (LibHalDrive *drive) |
const char * | libhal_drive_get_udi (LibHalDrive *drive) |
const char * | libhal_drive_get_serial (LibHalDrive *drive) |
const char * | libhal_drive_get_firmware_version (LibHalDrive *drive) |
const char * | libhal_drive_get_model (LibHalDrive *drive) |
const char * | libhal_drive_get_vendor (LibHalDrive *drive) |
const char * | libhal_volume_get_udi (LibHalVolume *volume) |
const char * | libhal_volume_get_device_file (LibHalVolume *volume) |
unsigned int | libhal_volume_get_device_major (LibHalVolume *volume) |
unsigned int | libhal_volume_get_device_minor (LibHalVolume *volume) |
const char * | libhal_volume_get_fstype (LibHalVolume *volume) |
const char * | libhal_volume_get_fsversion (LibHalVolume *volume) |
LibHalVolumeUsage | libhal_volume_get_fsusage (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_is_mounted (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_is_partition (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_is_disc (LibHalVolume *volume) |
unsigned int | libhal_volume_get_partition_number (LibHalVolume *volume) |
const char * | libhal_volume_get_label (LibHalVolume *volume) |
const char * | libhal_volume_get_mount_point (LibHalVolume *volume) |
const char * | libhal_volume_get_uuid (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_disc_has_audio (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_disc_has_data (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_disc_is_blank (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_disc_is_rewritable (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_disc_is_appendable (LibHalVolume *volume) |
LibHalVolumeDiscType | libhal_volume_get_disc_type (LibHalVolume *volume) |
dbus_bool_t | libhal_volume_should_ignore (LibHalVolume *volume) |
char ** | libhal_drive_find_all_volumes (LibHalContext *hal_ctx, LibHalDrive *drive, int *num_volumes) |
const char * | libhal_volume_crypto_get_backing_volume_udi (LibHalVolume *volume) |
char * | libhal_volume_crypto_get_clear_volume_udi (LibHalContext *hal_ctx, LibHalVolume *volume) |
char * | libhal_drive_policy_default_get_mount_root (LibHalContext *hal_ctx) |
dbus_bool_t | libhal_drive_policy_default_use_managed_keyword (LibHalContext *hal_ctx) |
char * | libhal_drive_policy_default_get_managed_keyword_primary (LibHalContext *hal_ctx) |
char * | libhal_drive_policy_default_get_managed_keyword_secondary (LibHalContext *hal_ctx) |
dbus_bool_t | libhal_drive_policy_is_mountable (LibHalDrive *drive, LibHalStoragePolicy *policy) |
const char * | libhal_drive_policy_get_desired_mount_point (LibHalDrive *drive, LibHalStoragePolicy *policy) |
static void | mopts_collect (LibHalContext *hal_ctx, const char *namespace, int namespace_len, const char *udi, char *options_string, size_t options_max_len, dbus_bool_t only_collect_imply_opts) |
const char * | libhal_drive_policy_get_mount_options (LibHalDrive *drive, LibHalStoragePolicy *policy) |
const char * | libhal_drive_policy_get_mount_fs (LibHalDrive *drive, LibHalStoragePolicy *policy) |
dbus_bool_t | libhal_volume_policy_is_mountable (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
const char * | libhal_volume_policy_get_desired_mount_point (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
const char * | libhal_volume_policy_get_mount_options (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
const char * | libhal_volume_policy_get_mount_fs (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy) |
dbus_bool_t | libhal_drive_no_partitions_hint (LibHalDrive *drive) |
|
Value: do { \ dst[dstmaxlen - 1] = '\0'; \ strncat (dst, src, dstmaxlen - strlen (dst) - 1); \ } while(0) Definition at line 1692 of file libhal-storage.c. Referenced by mopts_collect(). |
|
Free all resources used by a LibHalDrive object.
Definition at line 789 of file libhal-storage.c. References libhal_free_string(), and libhal_free_string_array(). |
|
Get the drive object that either is (when given e.g. /dev/sdb) or contains (when given e.g. /dev/sdb1) the given device file.
Definition at line 1230 of file libhal-storage.c. References libhal_device_get_property_string(), libhal_device_query_capability(), libhal_free_string(), and libhal_manager_find_device_string_match(). |
|
Given a UDI for a HAL device of capability 'storage', this function retrieves all the relevant properties into convenient in-process data structures.
Definition at line 876 of file libhal-storage.c. References libhal_device_get_all_properties(), libhal_device_query_capability(), LIBHAL_PROP_EXTRACT_BEGIN, LIBHAL_PROP_EXTRACT_BOOL, LIBHAL_PROP_EXTRACT_BOOL_BITFIELD, LIBHAL_PROP_EXTRACT_END, LIBHAL_PROP_EXTRACT_INT, LIBHAL_PROP_EXTRACT_STRING, LIBHAL_PROP_EXTRACT_STRLIST, libhal_psi_get_key(), libhal_psi_get_type(), libhal_psi_has_more(), libhal_psi_init(), and libhal_psi_next(). |
|
Free all resources used by a LibHalVolume object.
Definition at line 815 of file libhal-storage.c. References libhal_free_string(). |
|
Get the volume object for a given device file.
Definition at line 1289 of file libhal-storage.c. References libhal_device_query_capability(), and libhal_manager_find_device_string_match(). |
|
Given a UDI for a LIBHAL device of capability 'volume', this function retrieves all the relevant properties into convenient in-process data structures.
Definition at line 1064 of file libhal-storage.c. References libhal_device_get_all_properties(), libhal_device_query_capability(), LIBHAL_PROP_EXTRACT_BEGIN, LIBHAL_PROP_EXTRACT_BOOL, LIBHAL_PROP_EXTRACT_END, LIBHAL_PROP_EXTRACT_INT, LIBHAL_PROP_EXTRACT_STRING, libhal_psi_get_key(), libhal_psi_get_type(), libhal_psi_has_more(), libhal_psi_init(), and libhal_psi_next(). |
|
If the volume is on a drive with a MSDOS style partition table, return the partition table id.
Definition at line 1215 of file libhal-storage.c. |
|
Policy function to determine if a volume should be visible in a desktop environment. This is useful to hide certain system volumes as bootstrap partitions, the /usr partition, swap partitions and other volumes that a unprivileged desktop user shouldn't know even exists.
Definition at line 616 of file libhal-storage.c. References libhal_volume_get_fstype(), libhal_volume_get_fsusage(), libhal_volume_get_label(), and libhal_volume_get_mount_point(). |