Lines Matching defs:devices
4 * lshal.c : Show devices managed by HAL
48 * @defgroup HalLsHal List HAL devices
52 * monitor the devices managed by the HAL daemon. Uses libhal.
60 #define UDI_BASE "/org/freedesktop/Hal/devices/"
203 * @param num_devices Total number of devices in device list
204 * @param devices List of devices
209 dump_children (char *udi, int num_devices, struct Device *devices, int depth)
215 if (devices[i].parent)
219 if (!devices[i].parent)
221 if (strcmp (devices[i].parent, udi))
226 printf ("udi = '%s'\n", devices[i].name);
233 printf ("%s\n", short_name (devices[i].name));
237 print_props (devices[i].name);
241 dump_children(devices[i].name, num_devices, devices, depth + 1);
245 /** Dump all devices to stdout
254 struct Device *devices;
262 DIE (("Couldn't obtain list of devices\n"));
265 devices = malloc (sizeof(struct Device) * num_devices);
266 if (!devices) {
272 devices[i].name = device_names[i];
273 devices[i].parent = libhal_device_get_property_string (hal_ctx,
290 dump_children(NULL, num_devices, devices, 0);
293 if (devices[i].parent)
294 libhal_free_string (devices[i].parent);
297 free (devices);
562 "Shows all devices and their properties. If the --monitor option is given\n"
563 "then the device list and all devices are monitored for changes.\n"