/titanic_41/usr/src/cmd/hal/utils/ |
H A D | acpi.c | 41 laptop_panel_update(LibHalContext *ctx, const char *udi, int fd) in laptop_panel_update() argument 50 if (!libhal_device_query_capability(ctx, udi, "laptop_panel", &error)) { in laptop_panel_update() 58 libhal_device_add_capability(ctx, udi, "laptop_panel", &error); in laptop_panel_update() 59 if ((cs = libhal_device_new_changeset(udi)) == NULL) { in laptop_panel_update() 79 lid_update(LibHalContext *ctx, const char *udi, int fd) in lid_update() argument 87 if ((cs = libhal_device_new_changeset(udi)) == NULL) { in lid_update() 91 if (!libhal_device_query_capability(ctx, udi, "button", &error)) { in lid_update() 93 libhal_device_add_capability(ctx, udi, "button", &error); in lid_update() 142 ac_adapter_present(LibHalContext *ctx, const char *udi, int fd) in ac_adapter_present() argument 152 if ((cs = libhal_device_new_changeset(udi)) == NULL) { in ac_adapter_present() [all …]
|
H A D | acpi.h | 21 gboolean battery_update(LibHalContext *ctx, const char *udi, int fd); 22 gboolean ac_adapter_update(LibHalContext *ctx, const char *udi, int fd); 23 gboolean lid_update(LibHalContext *ctx, const char *udi, int fd); 24 gboolean laptop_panel_update(LibHalContext *ctx, const char *udi, int fd); 26 int open_device(LibHalContext *ctx, char *udi);
|
/titanic_41/usr/src/cmd/rmvolmgr/ |
H A D | rmvolmgr.c | 57 char *udi; member 77 static void rmm_device_added(LibHalContext *ctx, const char *udi); 78 static void rmm_device_removed(LibHalContext *ctx, const char *udi); 79 static void rmm_property_modified(LibHalContext *ctx, const char *udi, 81 static void rmm_device_condition(LibHalContext *ctx, const char *udi, 298 rmm_managed_alloc(LibHalContext *ctx, const char *udi) in rmm_managed_alloc() argument 305 if ((v->udi = strdup(udi)) == NULL) { in rmm_managed_alloc() 309 if (!rmm_volume_aa_from_prop(ctx, udi, NULL, &v->aa)) { in rmm_managed_alloc() 310 free(v->udi); in rmm_managed_alloc() 322 free(v->udi); in rmm_managed_free() [all …]
|
H A D | rmm_common.c | 495 rmm_hal_mount(LibHalContext *hal_ctx, const char *udi, in rmm_hal_mount() argument 502 dprintf("mounting %s...\n", udi); in rmm_hal_mount() 504 if (!(dmesg = dbus_message_new_method_call("org.freedesktop.Hal", udi, in rmm_hal_mount() 507 "mount failed for %s: cannot create dbus message\n", udi); in rmm_hal_mount() 520 dprintf("mount failed for %s: cannot append args\n", udi); in rmm_hal_mount() 528 dprintf("mount failed for %s: %s\n", udi, error->message); in rmm_hal_mount() 533 dprintf("mounted %s\n", udi); in rmm_hal_mount() 548 rmm_hal_unmount(LibHalContext *hal_ctx, const char *udi, DBusError *error) in rmm_hal_unmount() argument 554 dprintf("unmounting %s...\n", udi); in rmm_hal_unmount() 556 if (!(dmesg = dbus_message_new_method_call("org.freedesktop.Hal", udi, in rmm_hal_unmount() [all …]
|
/titanic_41/usr/src/cmd/hal/tools/ |
H A D | lshal.c | 78 short_name (const char *udi) in short_name() argument 80 return &udi[sizeof(UDI_BASE) - 1]; in short_name() 89 print_props (const char *udi) in print_props() argument 98 props = libhal_device_get_all_properties (hal_ctx, udi, &error); in print_props() 179 dump_device (const char *udi) in dump_device() argument 185 if (!libhal_device_exists (hal_ctx, udi, &error)) { in dump_device() 191 printf ("udi = '%s'\n", udi); in dump_device() 193 print_props (udi); in dump_device() 197 printf ("%s\n", short_name (udi)); in dump_device() 209 dump_children (char *udi, int num_devices, struct Device *devices, int depth) in dump_children() argument [all …]
|
H A D | hal-device.c | 51 char *udi; member 89 char *udi; member 115 opt.udi = optarg; in main() 120 opt.udi = optarg; in main() 156 err = remove_udi(hal_ctx, opt.udi); in main() 158 err = add_udi(hal_ctx, opt.udi); in main() 194 char *udi = NULL; in dump_devices() local 198 udi = arg; in dump_devices() 201 asprintf(&udi, "/org/freedesktop/Hal/devices/%s", arg); in dump_devices() 203 udi = calloc(1, sizeof ("/org/freedesktop/Hal/devices/%s") + strlen(arg)); in dump_devices() [all …]
|
H A D | hal_get_property.c | 85 char *udi = NULL; in main() local 135 udi = strdup (optarg); in main() 151 if (udi == NULL || key == NULL) { in main() 177 udi_exists = libhal_device_exists (hal_ctx, udi, &error); in main() 179 fprintf (stderr, "error: UDI %s does not exist\n", udi); 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_set_property.c | 110 char *udi = NULL; in main() local 197 udi = strdup (optarg); in main() 244 udi_exists = libhal_device_exists (hal_ctx, udi, &error); in main() 246 fprintf (stderr, "error: UDI %s does not exist\n", udi); in main() 256 rc = libhal_device_remove_property (hal_ctx, udi, key, &error); in main() 269 rc = libhal_device_set_property_string (hal_ctx, udi, key, str_value, &error); in main() 272 rc = libhal_device_set_property_int (hal_ctx, udi, key, int_value, &error); in main() 275 rc = libhal_device_set_property_uint64 (hal_ctx, udi, key, uint64_value, &error); in main() 278 rc = libhal_device_set_property_double (hal_ctx, udi, key, double_value, &error); in main() 281 rc = libhal_device_set_property_bool (hal_ctx, udi, key, bool_value, &error); in main() [all …]
|
H A D | hal-storage-unmount.c | 78 char *udi; in main() local 104 udi = getenv ("HAL_PROP_INFO_UDI"); in main() 105 if (udi == 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() 182 udi, NULL, drive, device, invoked_by_uid, in main() 203 udi, volume, drive, device, invoked_by_uid, in main()
|
/titanic_41/usr/src/lib/hal/libhal/common/ |
H A D | libhal.h | 120 const char *udi); 130 const char *udi); 142 const char *udi, 155 const char *udi, 169 const char *udi, 184 const char *udi, 241 dbus_bool_t libhal_device_exists (LibHalContext *ctx, const char *udi, DBusError *error); 244 dbus_bool_t libhal_device_print (LibHalContext *ctx, const char *udi, DBusError *error); 248 const char *udi, 254 const char *udi, [all …]
|
H A D | libhal.c | 422 libhal_device_get_all_properties (LibHalContext *ctx, const char *udi, DBusError *error) in libhal_device_get_all_properties() argument 433 LIBHAL_CHECK_UDI_VALID(udi, NULL); in libhal_device_get_all_properties() 435 message = dbus_message_new_method_call ("org.freedesktop.Hal", udi, in libhal_device_get_all_properties() 970 char *udi; in filter_func() local 972 DBUS_TYPE_STRING, &udi, in filter_func() 975 ctx->device_added (ctx, udi); in filter_func() 982 char *udi; in filter_func() local 984 DBUS_TYPE_STRING, &udi, in filter_func() 987 ctx->device_removed (ctx, udi); in filter_func() 994 char *udi; in filter_func() local [all …]
|
/titanic_41/usr/src/cmd/hal/hald/ |
H A D | hald_dbus.c | 106 DBusMessage *in_reply_to, const char *udi) in raise_no_such_device() argument 112 udi in raise_no_such_device() 305 const char *udi; in foreach_device_get_udi() local 307 udi = hal_device_get_udi (device); in foreach_device_get_udi() 308 dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &udi); in foreach_device_get_udi() 375 const char *udi; in foreach_device_match_get_udi() local 376 udi = hal_device_get_udi (device); in foreach_device_match_get_udi() 379 &udi); in foreach_device_match_get_udi() 393 if (strncmp (device->udi, "/org/freedesktop/Hal/devices/temp", in foreach_device_match_get_udi_tdl() 404 const char *udi; in foreach_device_match_get_udi_tdl() local [all …]
|
/titanic_41/usr/src/cmd/hal/probing/acpi/ |
H A D | probe-acpi.c | 36 char *udi; in main() local 42 if ((udi = getenv("UDI")) == NULL) in main() 55 device_file, udi)); in main() 61 if (strstr(udi, "_ac")) { in main() 62 ac_adapter_update(ctx, udi, fd); in main() 63 } else if (strstr(udi, "_battery")) { in main() 64 battery_update(ctx, udi, fd); in main() 65 } else if (strstr(udi, "_lid")) { in main() 66 lid_update(ctx, udi, fd); in main() 67 } else if (strstr(udi, "_hotkey")) { in main() [all …]
|
/titanic_41/usr/src/cmd/hal/addons/storage/ |
H A D | addon-storage.c | 40 static char *udi; variable 127 libhal_device_emit_condition (ctx, udi, "EjectPressed", "", &error); in sysevent_dev_handler() 135 force_unmount (LibHalContext *ctx, const char *udi) in force_unmount() argument 149 msg = dbus_message_new_method_call ("org.freedesktop.Hal", udi, in force_unmount() 153 HAL_DEBUG (("Could not create dbus message for %s", udi)); in force_unmount() 164 device_file = libhal_device_get_property_string (ctx, udi, "block.device", &error); in force_unmount() 173 HAL_DEBUG (("Could not append args to dbus message for %s", udi)); in force_unmount() 178 HAL_DEBUG (("Unmount failed for %s: %s : %s\n", udi, error.name, error.message)); in force_unmount() 183 HAL_DEBUG (("Unmount failed for %s\n%s : %s\n", udi, error.name, error.message)); in force_unmount() 187 HAL_DEBUG (("Succesfully unmounted udi '%s'", udi)); in force_unmount() [all …]
|
/titanic_41/usr/src/cmd/hal/probing/volume/ |
H A D | probe-volume.c | 75 set_fstyp_properties (LibHalContext *ctx, const char *udi, const char *fstype, nvlist_t *fsattr) in set_fstyp_properties() argument 87 if ((cs = libhal_device_new_changeset (udi)) == NULL) { in set_fstyp_properties() 129 hsfs_contents(int fd, off_t probe_offset, LibHalContext *ctx, const char *udi) in hsfs_contents() argument 204 libhal_device_set_property_bool (ctx, udi, in hsfs_contents() 207 libhal_device_set_property_bool (ctx, udi, in hsfs_contents() 210 libhal_device_set_property_bool (ctx, udi, in hsfs_contents() 219 probe_disc (int fd, LibHalContext *ctx, const char *udi, dbus_bool_t *has_data, in probe_disc() argument 346 if ((cs = libhal_device_new_changeset (udi)) == NULL) { in probe_disc() 422 char *udi; in main() local 459 if ((udi = getenv ("UDI")) == NULL) { in main() [all …]
|
/titanic_41/usr/src/cmd/hal/hald/solaris/ |
H A D | devinfo_misc.c | 131 char udi[HAL_PATH_MAX]; in devinfo_keyboard_add() local 152 hal_util_compute_udi(hald_get_gdl(), udi, sizeof (udi), in devinfo_keyboard_add() 155 hal_device_set_udi(d, udi); in devinfo_keyboard_add() 156 hal_device_property_set_string(d, "info.udi", udi); in devinfo_keyboard_add() 168 char udi[HAL_PATH_MAX]; in devinfo_mouse_add() local 187 hal_util_compute_udi(hald_get_gdl(), udi, sizeof (udi), in devinfo_mouse_add() 190 hal_device_set_udi(d, udi); in devinfo_mouse_add() 191 hal_device_property_set_string(d, "info.udi", udi); in devinfo_mouse_add()
|
H A D | devinfo_usb.c | 374 char udi[HAL_PATH_MAX]; in devinfo_usb_if_add() local 493 char udi[HAL_PATH_MAX]; in devinfo_usb_video4linux_add() local 523 hal_util_compute_udi(hald_get_gdl(), udi, sizeof (udi), in devinfo_usb_video4linux_add() 526 hal_device_set_udi(d, udi); in devinfo_usb_video4linux_add() 527 hal_device_property_set_string(d, "info.udi", udi); in devinfo_usb_video4linux_add() 555 char udi[HAL_PATH_MAX]; in devinfo_usb_input_add() local 592 hal_util_compute_udi(hald_get_gdl(), udi, sizeof (udi), in devinfo_usb_input_add() 595 hal_device_set_udi(d, udi); in devinfo_usb_input_add() 596 hal_device_property_set_string(d, "info.udi", udi); in devinfo_usb_input_add() 630 char udi[HAL_PATH_MAX]; in devinfo_usb_scsa2usb_add() local [all …]
|
H A D | devinfo_storage.c | 207 char udi[HAL_PATH_MAX]; in devinfo_ide_storage_add() local 218 hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi), in devinfo_ide_storage_add() 220 hal_device_set_udi (d, udi); in devinfo_ide_storage_add() 221 hal_device_property_set_string (d, "info.udi", udi); in devinfo_ide_storage_add() 252 char udi[HAL_PATH_MAX]; in devinfo_scsi_add() local 264 hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi), in devinfo_scsi_add() 266 hal_device_set_udi (d, udi); in devinfo_scsi_add() 267 hal_device_property_set_string (d, "info.udi", udi); in devinfo_scsi_add() 287 char udi[HAL_PATH_MAX]; in devinfo_scsi_storage_add() local 294 hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi), in devinfo_scsi_storage_add() [all …]
|
/titanic_41/usr/src/cmd/hal/addons/network-devices/ |
H A D | common.c | 35 network_device_name_to_udi(char *udi, size_t size, ...) in network_device_name_to_udi() argument 41 udi[0] = '\0'; in network_device_name_to_udi() 45 strlcat(udi, "/", size); in network_device_name_to_udi() 46 strlcat(udi, element, size); in network_device_name_to_udi() 50 for (i = 0; udi[i] != NULL; i++) in network_device_name_to_udi() 51 if (udi[i] == '.') in network_device_name_to_udi() 52 udi[i] = '_'; in network_device_name_to_udi() 172 char udi[128]; in add_network_printer() local 185 network_device_name_to_udi(udi, sizeof (udi), base, serial, NULL); in add_network_printer() 187 if (libhal_device_exists(ctx, udi, &error) == TRUE) in add_network_printer() [all …]
|
H A D | addon-network-discovery.c | 166 char *udi = getenv("UDI"); in nds_filter_function() local 179 rc = nds_EnablePrinterScanningViaSNMP(ctx, udi, interval, in nds_filter_function() 184 char *udi = getenv("UDI"); in nds_filter_function() local 196 rc = nds_ScanForPrintersViaSNMP(ctx, udi, community, network); in nds_filter_function() 227 nds_claim_interface(LibHalContext *ctx, char *udi, DBusError *error) in nds_claim_interface() argument 247 ctx, udi, error, DBUS_INTERFACE)); in nds_claim_interface() 254 if (libhal_device_claim_interface(ctx, udi, in nds_claim_interface() 314 char *udi; in main() local 316 if ((udi = getenv("UDI")) == NULL) { in main() 330 if (!libhal_device_addon_is_ready(ctx, udi, &error)) { in main() [all …]
|
H A D | cache.c | 47 char **udi = NULL; in device_remove_if_stale() local 51 udi = libhal_manager_find_device_string_match(args->ctx, in device_remove_if_stale() 55 if (udi != NULL) { in device_remove_if_stale() 59 libhal_remove_device(args->ctx, udi[i], &error); in device_remove_if_stale() 60 HAL_DEBUG(("remove: %s (%s)", name, udi[i])); in device_remove_if_stale() 62 libhal_free_string_array(udi); in device_remove_if_stale()
|
/titanic_41/usr/src/cmd/hal/probing/network-printer/ |
H A D | probe-network-printer.c | 39 char *udi; in main() local 58 if ((udi = getenv("UDI")) == NULL) in main() 76 if ((cs = libhal_device_new_changeset(udi)) == NULL) { in main() 92 ret = add_printer_info(cs, udi, manufacturer, model, description, in main() 96 printer_address, udi, strerror(errno))); in main()
|
/titanic_41/usr/src/cmd/hal/hald-runner/ |
H A D | runner.c | 101 g_free(r->udi); in del_run_request() 141 list = (GList *)g_hash_table_lookup(udi_hash, rd->r->udi); in remove_run_data() 144 g_hash_table_insert(udi_hash, g_strdup(rd->r->udi), list); in remove_run_data() 315 list = (GList *)g_hash_table_lookup(udi_hash, r->udi); in run_request_run() 319 g_hash_table_insert(udi_hash, g_strdup(r->udi), list); in run_request_run() 351 do_kill_udi(gchar *udi) in do_kill_udi() argument 354 list = (GList *)g_hash_table_lookup(udi_hash, udi); in do_kill_udi() 361 run_kill_udi(gchar *udi) in run_kill_udi() argument 363 do_kill_udi(udi); in run_kill_udi() 364 g_hash_table_remove(udi_hash, udi); in run_kill_udi()
|
/titanic_41/usr/src/lib/hal/libhal-storage/common/ |
H A D | libhal-storage.c | 679 char *udi; member 724 char *udi; member 802 free (drive->udi); in libhal_drive_free() 831 free (vol->udi); in libhal_volume_free() 895 libhal_drive_from_udi (LibHalContext *hal_ctx, const char *udi) in libhal_drive_from_udi() argument 911 if (!libhal_device_query_capability (hal_ctx, udi, "storage", &error)) in libhal_drive_from_udi() 921 drive->udi = strdup (udi); in libhal_drive_from_udi() 922 if (drive->udi == NULL) in libhal_drive_from_udi() 925 properties = libhal_device_get_all_properties (hal_ctx, udi, &error); in libhal_drive_from_udi() 1089 libhal_volume_from_udi (LibHalContext *hal_ctx, const char *udi) in libhal_volume_from_udi() argument [all …]
|
/titanic_41/usr/src/cmd/hal/probing/printer/ |
H A D | probe-printer.c | 108 char *udi; in main() local 119 if ((udi = getenv("UDI")) == NULL) in main() 133 if ((cs = libhal_device_new_changeset(udi)) == NULL) { in main() 148 ret = add_printer_info(cs, udi, manufacturer, model, description, in main() 152 device_file, udi, strerror(errno))); in main()
|