Searched refs:hal_ctx (Results 1 - 23 of 23) sorted by relevance

/illumos-gate/usr/src/cmd/volrmmount/
H A Dvolrmmount.c74 LibHalContext *hal_ctx; local
106 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) {
116 if ((d = rmm_hal_volume_find_default(hal_ctx, &error,
126 if ((d = rmm_hal_volume_find_default(hal_ctx, &error,
134 if (!rmm_action(hal_ctx, default_name, action,
141 if (rmm_action(hal_ctx, argv[optind], action,
148 rmm_hal_fini(hal_ctx);
/illumos-gate/usr/src/cmd/volcheck/
H A Dvolcheck.c60 LibHalContext *hal_ctx; local
84 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) {
94 ret = rmm_rescan(hal_ctx, NULL, B_FALSE);
97 if (rmm_rescan(hal_ctx, argv[optind], B_FALSE) != 0) {
103 rmm_hal_fini(hal_ctx);
/illumos-gate/usr/src/cmd/hal/tools/
H A Dhal-device.c71 int dump_devices(LibHalContext *hal_ctx, char *arg);
72 int remove_udi(LibHalContext *hal_ctx, char *arg);
73 int add_udi(LibHalContext *hal_ctx, char *arg);
74 void process_property(LibHalContext *hal_ctx, char *buf, lh_prop_t **prop);
75 int add_properties(LibHalContext *hal_ctx, new_dev_t *nd, lh_prop_t *prop);
104 LibHalContext *hal_ctx; local
140 if (!(hal_ctx = libhal_ctx_new())) return 3;
141 if (!libhal_ctx_set_dbus_connection(hal_ctx, conn)) return 4;
142 if (!libhal_ctx_init(hal_ctx, &error)) {
154 err = dump_devices(hal_ctx, arg
188 dump_devices(LibHalContext *hal_ctx, char *arg) argument
304 remove_udi(LibHalContext *hal_ctx, char *arg) argument
340 add_udi(LibHalContext *hal_ctx, char *arg) argument
447 process_property(LibHalContext *hal_ctx, char *buf, lh_prop_t **prop) argument
545 add_properties(LibHalContext *hal_ctx, new_dev_t *nd, lh_prop_t *prop) argument
[all...]
H A Dhal_get_property.c47 static LibHalContext *hal_ctx; variable
157 if ((hal_ctx = libhal_ctx_new ()) == NULL) {
161 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
166 if (!libhal_ctx_init (hal_ctx, &error)) {
177 udi_exists = libhal_device_exists (hal_ctx, udi, &error);
189 type = libhal_device_get_property_type (hal_ctx, udi, key, &error);
202 str = libhal_device_get_property_string (hal_ctx, udi, key, &error);
213 libhal_device_get_property_int (hal_ctx, udi, key, &error));
220 (long long unsigned int) libhal_device_get_property_uint64 (hal_ctx, udi, key, &error));
226 libhal_device_get_property_double (hal_ctx, ud
[all...]
H A Dhal_find_by_capability.c81 LibHalContext *hal_ctx; local
139 if ((hal_ctx = libhal_ctx_new ()) == NULL) {
144 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
149 if (!libhal_ctx_init (hal_ctx, &error)) {
160 udis = libhal_find_device_by_capability (hal_ctx, capability, &num_udis, &error);
H A Dhal_set_property.c39 static LibHalContext *hal_ctx; variable
224 if ((hal_ctx = libhal_ctx_new ()) == NULL) {
228 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
233 if (!libhal_ctx_init (hal_ctx, &error)) {
244 udi_exists = libhal_device_exists (hal_ctx, udi, &error);
256 rc = libhal_device_remove_property (hal_ctx, udi, key, &error);
269 rc = libhal_device_set_property_string (hal_ctx, udi, key, str_value, &error);
272 rc = libhal_device_set_property_int (hal_ctx, udi, key, int_value, &error);
275 rc = libhal_device_set_property_uint64 (hal_ctx, udi, key, uint64_value, &error);
278 rc = libhal_device_set_property_double (hal_ctx, ud
[all...]
H A Dlshal.c62 static LibHalContext *hal_ctx; variable
98 props = libhal_device_get_all_properties (hal_ctx, udi, &error);
185 if (!libhal_device_exists (hal_ctx, udi, &error)) {
259 device_names = libhal_get_all_devices (hal_ctx, &num_devices, &error);
273 devices[i].parent = libhal_device_get_property_string (hal_ctx,
405 type = libhal_device_get_property_type (hal_ctx, udi, key, &error);
409 str = libhal_device_get_property_string (hal_ctx, udi, key, &error);
415 dbus_int32_t value = libhal_device_get_property_int (hal_ctx, udi, key, &error);
422 dbus_uint64_t value = libhal_device_get_property_uint64 (hal_ctx, udi, key, &error);
429 libhal_device_get_property_double (hal_ctx, ud
[all...]
H A Dhal-storage-eject.c83 LibHalContext *hal_ctx = NULL; local
110 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
160 if ((volume = libhal_volume_from_udi (hal_ctx, udi)) != NULL) {
169 if ((drive = libhal_drive_from_udi (hal_ctx, drive_udi)) == NULL) {
174 volume_udis = libhal_drive_find_all_volumes (hal_ctx, drive, &num_volumes);
186 volume_to_unmount = libhal_volume_from_udi (hal_ctx, volume_udi);
201 handle_unmount (hal_ctx,
222 handle_eject (hal_ctx,
H A Dhal_find_by_property.c86 LibHalContext *hal_ctx; local
147 if ((hal_ctx = libhal_ctx_new ()) == NULL) {
151 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
156 if (!libhal_ctx_init (hal_ctx, &error)) {
167 udis = libhal_manager_find_device_string_match (hal_ctx, key, value, &num_udis, &error);
H A Dhal-storage-unmount.c82 LibHalContext *hal_ctx = NULL; local
113 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
170 volume = libhal_volume_from_udi (hal_ctx, udi);
174 drive = libhal_drive_from_udi (hal_ctx, udi);
178 handle_unmount (hal_ctx,
195 drive = libhal_drive_from_udi (hal_ctx, drive_udi);
199 handle_unmount (hal_ctx,
H A Dhal-storage-closetray.c83 LibHalContext *hal_ctx = NULL; local
108 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
158 if ((drive = libhal_drive_from_udi (hal_ctx, udi)) == NULL) {
163 handle_eject (hal_ctx,
H A Dhal-storage-shared.h54 void handle_unmount (LibHalContext *hal_ctx,
64 void handle_eject (LibHalContext *hal_ctx,
H A Dhal-storage-zpool.c100 handle_zpool (LibHalContext *hal_ctx, argument
181 LibHalContext *hal_ctx = NULL; local
202 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
224 if ((volume = libhal_volume_from_udi (hal_ctx, udi)) == NULL) {
230 if ((drive = libhal_drive_from_udi (hal_ctx, drive_udi)) == NULL) {
242 handle_zpool (hal_ctx,
H A Dhal-storage-mount.c264 volume_findby (LibHalContext *hal_ctx, const char *property, const char *value) argument
274 if ((hal_udis = libhal_manager_find_device_string_match (hal_ctx, property,
282 if (libhal_device_query_capability (hal_ctx, udi, "volume", &error)) {
291 result = libhal_volume_from_udi (hal_ctx, found_udi);
299 bailout_if_in_fstab (LibHalContext *hal_ctx, const char *device, const char *label, const char *uuid) argument
346 mounted_vol = volume_findby (hal_ctx, "volume.mount_point", _mount_point);
445 handle_mount (LibHalContext *hal_ctx, argument
507 if (libhal_device_get_property_bool (hal_ctx, udi, "volume.ignore", &error) ||
530 bailout_if_in_fstab (hal_ctx, device, label, uuid);
579 append_ro = libhal_device_get_property_bool (hal_ctx, libhal_drive_get_ud
1068 LibHalContext *hal_ctx = NULL; local
[all...]
H A Dhal-storage-shared.c259 handle_unmount (LibHalContext *hal_ctx, argument
298 if (libhal_device_get_property_bool (hal_ctx, udi, "volume.ignore", &error) ||
533 handle_eject (LibHalContext *hal_ctx, argument
/illumos-gate/usr/src/cmd/rmvolmgr/
H A Drmm_common.c147 rmm_hal_fini(LibHalContext *hal_ctx) argument
149 DBusConnection *dbus_conn = libhal_ctx_get_dbus_connection(hal_ctx);
152 (void) libhal_ctx_free(hal_ctx);
161 rmm_hal_volume_find(LibHalContext *hal_ctx, const char *name, DBusError *error, argument
180 if (((drive = rmm_hal_volume_findby(hal_ctx,
182 ((drive = rmm_hal_volume_findby(hal_ctx,
184 ((drive = rmm_hal_volume_findby(hal_ctx,
186 ((drive = rmm_hal_volume_findby(hal_ctx,
195 if ((drive = rmm_hal_volume_findby(hal_ctx,
200 drive = rmm_hal_volume_findby_nickname(hal_ctx, nam
213 rmm_hal_volume_find_default(LibHalContext *hal_ctx, DBusError *error, const char **name_out, GSList **volumes) argument
250 rmm_hal_volume_findby(LibHalContext *hal_ctx, const char *property, const char *value, GSList **volumes) argument
354 rmm_print_volume_nicknames(LibHalContext *hal_ctx, DBusError *error, int print_mask) argument
429 rmm_hal_volume_findby_nickname(LibHalContext *hal_ctx, const char *name, GSList **volumes) argument
495 rmm_hal_mount(LibHalContext *hal_ctx, const char *udi, char **opts, int num_opts, char *mountpoint, DBusError *error) argument
548 rmm_hal_unmount(LibHalContext *hal_ctx, const char *udi, DBusError *error) argument
593 rmm_hal_eject(LibHalContext *hal_ctx, const char *udi, DBusError *error) argument
638 rmm_hal_closetray(LibHalContext *hal_ctx, const char *udi, DBusError *error) argument
686 rmm_hal_rescan(LibHalContext *hal_ctx, const char *udi, DBusError *error) argument
719 rmm_hal_claim_branch(LibHalContext *hal_ctx, const char *udi) argument
760 rmm_hal_unclaim_branch(LibHalContext *hal_ctx, const char *udi) argument
801 rmm_action_one(LibHalContext *hal_ctx, const char *name, action_t action, const char *dev, const char *udi, LibHalVolume *v, char **opts, int num_opts, char *mountpoint) argument
880 rmm_action(LibHalContext *hal_ctx, const char *name, action_t action, struct action_arg *aap, char **opts, int num_opts, char *mountpoint) argument
977 rmm_rescan(LibHalContext *hal_ctx, const char *name, boolean_t query) argument
1066 rmm_volume_aa_from_prop(LibHalContext *hal_ctx, const char *udi_arg, LibHalVolume *volume_arg, struct action_arg *aap) argument
1188 rmm_volume_aa_update_mountpoint(LibHalContext *hal_ctx, const char *udi, struct action_arg *aap) argument
[all...]
H A Drmvolmgr.c65 static LibHalContext *hal_ctx; variable
204 if ((hal_ctx = rmm_hal_init(rmm_device_added, rmm_device_removed,
213 if (!rmm_hal_claim_branch(hal_ctx, HAL_BRANCH_LOCAL)) {
341 if (libhal_device_get_property_bool(hal_ctx, udi,
347 if (!(storage_device = libhal_device_get_property_string(hal_ctx, udi,
354 if (!libhal_device_get_property_bool(hal_ctx, storage_device,
356 !libhal_device_get_property_bool(hal_ctx, storage_device,
362 if (libhal_device_get_property_bool(hal_ctx, storage_device,
393 if ((v = rmm_managed_alloc(hal_ctx, udi)) == NULL) {
396 if (rmm_action(hal_ctx, ud
[all...]
H A Dvold.h63 int vold_postprocess(LibHalContext *hal_ctx, const char *udi,
H A Drmm_common.h71 void rmm_hal_fini(LibHalContext *hal_ctx);
H A Dvold.c180 LibHalContext *hal_ctx; local
278 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) {
338 ret = rmm_action(hal_ctx, volume_symdev, action, 0, 0, 0,
341 if (hal_ctx != NULL) {
342 rmm_hal_fini(hal_ctx);
353 vold_postprocess(LibHalContext *hal_ctx, const char *udi, argument
360 rmm_volume_aa_update_mountpoint(hal_ctx, udi, aap);
/illumos-gate/usr/src/cmd/rmmount/
H A Drmmount.c73 LibHalContext *hal_ctx; local
135 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) {
149 if ((d = rmm_hal_volume_find_default(hal_ctx, &error,
163 rmm_print_volume_nicknames(hal_ctx, &error, print_mask);
166 if ((d = rmm_hal_volume_find_default(hal_ctx, &error,
176 ret = rmm_rescan(hal_ctx, default_name,
179 ret = rmm_action(hal_ctx, default_name, action,
188 ret = rmm_rescan(hal_ctx, argv[optind],
191 ret = rmm_action(hal_ctx, argv[optind], action,
197 rmm_hal_fini(hal_ctx);
[all...]
/illumos-gate/usr/src/lib/hal/libhal-storage/common/
H A Dlibhal-storage.c716 LibHalContext *hal_ctx; member in struct:LibHalDrive_s
890 * @param hal_ctx libhal context
895 libhal_drive_from_udi (LibHalContext *hal_ctx, const char *udi) argument
904 LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
911 if (!libhal_device_query_capability (hal_ctx, udi, "storage", &error))
919 drive->hal_ctx = hal_ctx;
925 properties = libhal_device_get_all_properties (hal_ctx, udi, &error);
1084 * @param hal_ctx libhal context
1089 libhal_volume_from_udi (LibHalContext *hal_ctx, cons argument
1303 libhal_drive_from_device_file(LibHalContext *hal_ctx, const char *device_file) argument
1366 libhal_volume_from_device_file(LibHalContext *hal_ctx, const char *device_file) argument
1706 libhal_drive_find_all_volumes(LibHalContext *hal_ctx, LibHalDrive *drive, int *num_volumes) argument
1759 libhal_volume_crypto_get_clear_volume_udi(LibHalContext *hal_ctx, LibHalVolume *volume) argument
1791 libhal_drive_policy_default_get_mount_root(LibHalContext *hal_ctx) argument
1807 libhal_drive_policy_default_use_managed_keyword(LibHalContext *hal_ctx) argument
1823 libhal_drive_policy_default_get_managed_keyword_primary(LibHalContext *hal_ctx) argument
1839 libhal_drive_policy_default_get_managed_keyword_secondary(LibHalContext *hal_ctx) argument
1878 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) argument
[all...]
H A Dlibhal-storage.h192 LibHalDrive *libhal_drive_from_udi (LibHalContext *hal_ctx,
194 LibHalDrive *libhal_drive_from_device_file (LibHalContext *hal_ctx,
239 char **libhal_drive_find_all_volumes (LibHalContext *hal_ctx,
244 char *libhal_drive_policy_default_get_mount_root (LibHalContext *hal_ctx) LIBHAL_DEPRECATED;
245 dbus_bool_t libhal_drive_policy_default_use_managed_keyword (LibHalContext *hal_ctx) LIBHAL_DEPRECATED;
246 char *libhal_drive_policy_default_get_managed_keyword_primary (LibHalContext *hal_ctx) LIBHAL_DEPRECATED;
247 char *libhal_drive_policy_default_get_managed_keyword_secondary (LibHalContext *hal_ctx) LIBHAL_DEPRECATED;
278 LibHalVolume *libhal_volume_from_udi (LibHalContext *hal_ctx,
280 LibHalVolume *libhal_volume_from_device_file (LibHalContext *hal_ctx,
313 char *libhal_volume_crypto_get_clear_volume_udi (LibHalContext *hal_ctx, LibHalVolum
[all...]

Completed in 96 milliseconds