/illumos-gate/usr/src/cmd/rmvolmgr/ |
H A D | rmm_common.c | 147 rmm_hal_fini(LibHalContext *hal_ctx) in rmm_hal_fini() argument 149 DBusConnection *dbus_conn = libhal_ctx_get_dbus_connection(hal_ctx); in rmm_hal_fini() 152 (void) libhal_ctx_free(hal_ctx); in rmm_hal_fini() 161 rmm_hal_volume_find(LibHalContext *hal_ctx, const char *name, DBusError *error, in rmm_hal_volume_find() argument 180 if (((drive = rmm_hal_volume_findby(hal_ctx, in rmm_hal_volume_find() 182 ((drive = rmm_hal_volume_findby(hal_ctx, in rmm_hal_volume_find() 184 ((drive = rmm_hal_volume_findby(hal_ctx, in rmm_hal_volume_find() 186 ((drive = rmm_hal_volume_findby(hal_ctx, in rmm_hal_volume_find() 195 if ((drive = rmm_hal_volume_findby(hal_ctx, in rmm_hal_volume_find() 200 drive = rmm_hal_volume_findby_nickname(hal_ctx, name, volumes); in rmm_hal_volume_find() [all …]
|
H A D | rmvolmgr.c | 65 static LibHalContext *hal_ctx; variable 204 if ((hal_ctx = rmm_hal_init(rmm_device_added, rmm_device_removed, in rmvolmgr() 213 if (!rmm_hal_claim_branch(hal_ctx, HAL_BRANCH_LOCAL)) { in rmvolmgr() 341 if (libhal_device_get_property_bool(hal_ctx, udi, in volume_should_mount() 347 if (!(storage_device = libhal_device_get_property_string(hal_ctx, udi, in volume_should_mount() 354 if (!libhal_device_get_property_bool(hal_ctx, storage_device, in volume_should_mount() 356 !libhal_device_get_property_bool(hal_ctx, storage_device, in volume_should_mount() 362 if (libhal_device_get_property_bool(hal_ctx, storage_device, in volume_should_mount() 393 if ((v = rmm_managed_alloc(hal_ctx, udi)) == NULL) { in volume_added() 396 if (rmm_action(hal_ctx, udi, INSERT, &v->aa, 0, 0, 0)) { in volume_added() [all …]
|
H A D | vold.c | 180 LibHalContext *hal_ctx; in vold_rmmount() local 278 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) { in vold_rmmount() 338 ret = rmm_action(hal_ctx, volume_symdev, action, 0, 0, 0, in vold_rmmount() 341 if (hal_ctx != NULL) { in vold_rmmount() 342 rmm_hal_fini(hal_ctx); in vold_rmmount() 353 vold_postprocess(LibHalContext *hal_ctx, const char *udi, in vold_postprocess() argument 360 rmm_volume_aa_update_mountpoint(hal_ctx, udi, aap); in vold_postprocess()
|
H A D | vold.h | 61 int vold_postprocess(LibHalContext *hal_ctx, const char *udi,
|
H A D | rmm_common.h | 71 void rmm_hal_fini(LibHalContext *hal_ctx);
|
/illumos-gate/usr/src/cmd/hal/tools/ |
H A D | hal-device.c | 71 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; in main() local 140 if (!(hal_ctx = libhal_ctx_new())) return 3; in main() 141 if (!libhal_ctx_set_dbus_connection(hal_ctx, conn)) return 4; in main() 142 if (!libhal_ctx_init(hal_ctx, &error)) { in main() 154 err = dump_devices(hal_ctx, argv[optind]); in main() [all …]
|
H A D | lshal.c | 62 static LibHalContext *hal_ctx; variable 98 props = libhal_device_get_all_properties (hal_ctx, udi, &error); in print_props() 185 if (!libhal_device_exists (hal_ctx, udi, &error)) { in dump_device() 259 device_names = libhal_get_all_devices (hal_ctx, &num_devices, &error); in dump_devices() 273 devices[i].parent = libhal_device_get_property_string (hal_ctx, in dump_devices() 405 type = libhal_device_get_property_type (hal_ctx, udi, key, &error); in print_property() 409 str = libhal_device_get_property_string (hal_ctx, udi, key, &error); in print_property() 415 dbus_int32_t value = libhal_device_get_property_int (hal_ctx, udi, key, &error); in print_property() 422 dbus_uint64_t value = libhal_device_get_property_uint64 (hal_ctx, udi, key, &error); in print_property() 429 libhal_device_get_property_double (hal_ctx, udi, key, &error)); in print_property() [all …]
|
H A D | hal_set_property.c | 39 static LibHalContext *hal_ctx; variable 230 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) { in main() 236 if ((hal_ctx = libhal_ctx_new ()) == NULL) { in main() 240 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) { in main() 245 if (!libhal_ctx_init (hal_ctx, &error)) { in main() 257 udi_exists = libhal_device_exists (hal_ctx, udi, &error); in main() 269 rc = libhal_device_remove_property (hal_ctx, udi, key, &error); in main() 282 rc = libhal_device_set_property_string (hal_ctx, udi, key, str_value, &error); in main() 285 rc = libhal_device_set_property_int (hal_ctx, udi, key, int_value, &error); in main() 288 rc = libhal_device_set_property_uint64 (hal_ctx, udi, key, uint64_value, &error); in main() [all …]
|
H A D | hal_get_property.c | 47 static LibHalContext *hal_ctx; variable 157 if ((hal_ctx = libhal_ctx_new ()) == NULL) { in main() 161 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) { in main() 166 if (!libhal_ctx_init (hal_ctx, &error)) { in main() 177 udi_exists = libhal_device_exists (hal_ctx, udi, &error); in main() 189 type = libhal_device_get_property_type (hal_ctx, udi, key, &error); in main() 202 str = libhal_device_get_property_string (hal_ctx, udi, key, &error); in main() 213 libhal_device_get_property_int (hal_ctx, udi, key, &error)); in main() 220 (long long unsigned int) libhal_device_get_property_uint64 (hal_ctx, udi, key, &error)); in main() 226 libhal_device_get_property_double (hal_ctx, udi, key, &error)); in main() [all …]
|
H A D | hal-storage-eject.c | 83 LibHalContext *hal_ctx = NULL; in main() local 110 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) { in main() 160 if ((volume = libhal_volume_from_udi (hal_ctx, udi)) != NULL) { in main() 169 if ((drive = libhal_drive_from_udi (hal_ctx, drive_udi)) == NULL) { in main() 174 volume_udis = libhal_drive_find_all_volumes (hal_ctx, drive, &num_volumes); in main() 186 volume_to_unmount = libhal_volume_from_udi (hal_ctx, volume_udi); in main() 201 handle_unmount (hal_ctx, in main() 222 handle_eject (hal_ctx, in main()
|
H A D | hal-storage-unmount.c | 82 LibHalContext *hal_ctx = NULL; in main() local 113 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) { in main() 170 volume = libhal_volume_from_udi (hal_ctx, udi); in main() 174 drive = libhal_drive_from_udi (hal_ctx, udi); in main() 178 handle_unmount (hal_ctx, in main() 195 drive = libhal_drive_from_udi (hal_ctx, drive_udi); in main() 199 handle_unmount (hal_ctx, in main()
|
H A D | hal_find_by_capability.c | 81 LibHalContext *hal_ctx; in main() local 139 if ((hal_ctx = libhal_ctx_new ()) == NULL) { in main() 144 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) { in main() 149 if (!libhal_ctx_init (hal_ctx, &error)) { in main() 160 udis = libhal_find_device_by_capability (hal_ctx, capability, &num_udis, &error); in main()
|
H A D | hal_find_by_property.c | 86 LibHalContext *hal_ctx; in main() local 147 if ((hal_ctx = libhal_ctx_new ()) == NULL) { in main() 151 if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) { in main() 156 if (!libhal_ctx_init (hal_ctx, &error)) { in main() 167 udis = libhal_manager_find_device_string_match (hal_ctx, key, value, &num_udis, &error); in main()
|
H A D | hal-storage-mount.c | 264 volume_findby (LibHalContext *hal_ctx, const char *property, const char *value) in volume_findby() argument 274 if ((hal_udis = libhal_manager_find_device_string_match (hal_ctx, property, in volume_findby() 282 if (libhal_device_query_capability (hal_ctx, udi, "volume", &error)) { in volume_findby() 291 result = libhal_volume_from_udi (hal_ctx, found_udi); in volume_findby() 299 bailout_if_in_fstab (LibHalContext *hal_ctx, const char *device, const char *label, const char *uui… in bailout_if_in_fstab() argument 346 mounted_vol = volume_findby (hal_ctx, "volume.mount_point", _mount_point); in bailout_if_in_fstab() 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_udi(drive), [all …]
|
H A D | hal-storage-zpool.c | 98 handle_zpool (LibHalContext *hal_ctx, in handle_zpool() argument 179 LibHalContext *hal_ctx = NULL; in main() local 200 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) { in main() 222 if ((volume = libhal_volume_from_udi (hal_ctx, udi)) == NULL) { in main() 228 if ((drive = libhal_drive_from_udi (hal_ctx, drive_udi)) == NULL) { in main() 240 handle_zpool (hal_ctx, in main()
|
H A D | hal-storage-closetray.c | 83 LibHalContext *hal_ctx = NULL; in main() local 108 if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) { in main() 158 if ((drive = libhal_drive_from_udi (hal_ctx, udi)) == NULL) { in main() 163 handle_eject (hal_ctx, in main()
|
H A D | hal-storage-shared.h | 54 void handle_unmount (LibHalContext *hal_ctx, 64 void handle_eject (LibHalContext *hal_ctx,
|
H A D | hal-storage-shared.c | 259 handle_unmount (LibHalContext *hal_ctx, in handle_unmount() argument 298 if (libhal_device_get_property_bool (hal_ctx, udi, "volume.ignore", &error) || in handle_unmount() 533 handle_eject (LibHalContext *hal_ctx, in handle_eject() argument
|
/illumos-gate/usr/src/cmd/rmmount/ |
H A D | rmmount.c | 73 LibHalContext *hal_ctx; in rmmount() local 135 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) { in rmmount() 149 if ((d = rmm_hal_volume_find_default(hal_ctx, &error, in rmmount() 163 rmm_print_volume_nicknames(hal_ctx, &error, print_mask); in rmmount() 166 if ((d = rmm_hal_volume_find_default(hal_ctx, &error, in rmmount() 176 ret = rmm_rescan(hal_ctx, default_name, in rmmount() 179 ret = rmm_action(hal_ctx, default_name, action, in rmmount() 188 ret = rmm_rescan(hal_ctx, argv[optind], in rmmount() 191 ret = rmm_action(hal_ctx, argv[optind], action, in rmmount() 197 rmm_hal_fini(hal_ctx); in rmmount()
|
/illumos-gate/usr/src/lib/hal/libhal-storage/common/ |
H A D | libhal-storage.c | 708 LibHalContext *hal_ctx; member 887 libhal_drive_from_udi (LibHalContext *hal_ctx, const char *udi) in libhal_drive_from_udi() argument 896 LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL); in libhal_drive_from_udi() 903 if (!libhal_device_query_capability (hal_ctx, udi, "storage", &error)) in libhal_drive_from_udi() 911 drive->hal_ctx = hal_ctx; in libhal_drive_from_udi() 917 properties = libhal_device_get_all_properties (hal_ctx, udi, &error); in libhal_drive_from_udi() 1081 libhal_volume_from_udi (LibHalContext *hal_ctx, const char *udi) in libhal_volume_from_udi() argument 1090 LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL); in libhal_volume_from_udi() 1098 if (!libhal_device_query_capability (hal_ctx, udi, "volume", &error)) in libhal_volume_from_udi() 1108 properties = libhal_device_get_all_properties (hal_ctx, udi, &error); in libhal_volume_from_udi() [all …]
|
H A D | libhal-storage.h | 192 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) LIB… 245 dbus_bool_t libhal_drive_policy_default_use_managed_keyword (LibHalContext *hal_ctx) LIB… 246 char *libhal_drive_policy_default_get_managed_keyword_primary (LibHalContext *hal_ctx) LIB… 247 char *libhal_drive_policy_default_get_managed_keyword_secondary (LibHalContext *hal_ctx) LIB… 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, LibHal…
|
/illumos-gate/usr/src/cmd/volrmmount/ |
H A D | volrmmount.c | 74 LibHalContext *hal_ctx; in main() local 106 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) { in main() 116 if ((d = rmm_hal_volume_find_default(hal_ctx, &error, in main() 126 if ((d = rmm_hal_volume_find_default(hal_ctx, &error, in main() 134 if (!rmm_action(hal_ctx, default_name, action, in main() 141 if (rmm_action(hal_ctx, argv[optind], action, in main() 148 rmm_hal_fini(hal_ctx); in main()
|
/illumos-gate/usr/src/cmd/volcheck/ |
H A D | volcheck.c | 58 LibHalContext *hal_ctx; in main() local 79 if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) { in main() 89 ret = rmm_rescan(hal_ctx, NULL, B_FALSE); in main() 92 if (rmm_rescan(hal_ctx, argv[optind], B_FALSE) != 0) { in main() 98 rmm_hal_fini(hal_ctx); in main()
|