Lines Matching defs:device

34 static void print_device(struct udev_device *device) {
40 printf("*** device: %p ***\n", device);
41 str = udev_device_get_action(device);
45 str = udev_device_get_syspath(device);
48 str = udev_device_get_sysname(device);
51 str = udev_device_get_sysnum(device);
55 str = udev_device_get_devpath(device);
58 str = udev_device_get_subsystem(device);
62 str = udev_device_get_devtype(device);
66 str = udev_device_get_driver(device);
70 str = udev_device_get_devnode(device);
74 devnum = udev_device_get_devnum(device);
79 udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(device)) {
87 udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(device)) {
96 str = udev_device_get_property_value(device, "MAJOR");
100 str = udev_device_get_sysattr_value(device, "dev");
108 _cleanup_udev_device_unref_ struct udev_device *device;
110 printf("looking at device: %s\n", syspath);
111 device = udev_device_new_from_syspath(udev, syspath);
112 if (device == NULL) {
113 printf("no device found\n");
116 print_device(device);
122 _cleanup_udev_device_unref_ struct udev_device *device;
125 printf("looking at device: %s\n", syspath);
126 device = udev_device_new_from_syspath(udev, syspath);
127 if (device == NULL)
131 device_parent = device;
138 device_parent = device;
149 struct udev_device *device;
151 printf("looking up device: %u:%u\n", major(devnum), minor(devnum));
152 device = udev_device_new_from_devnum(udev, 'c', devnum);
153 if (device == NULL)
155 print_device(device);
156 udev_device_unref(device);
161 struct udev_device *device;
163 printf("looking up device: 'block':'sda'\n");
164 device = udev_device_new_from_subsystem_sysname(udev, "block", "sda");
165 if (device == NULL)
167 print_device(device);
168 udev_device_unref(device);
170 printf("looking up device: 'subsystem':'pci'\n");
171 device = udev_device_new_from_subsystem_sysname(udev, "subsystem", "pci");
172 if (device == NULL)
174 print_device(device);
175 udev_device_unref(device);
177 printf("looking up device: 'drivers':'scsi:sd'\n");
178 device = udev_device_new_from_subsystem_sysname(udev, "drivers", "scsi:sd");
179 if (device == NULL)
181 print_device(device);
182 udev_device_unref(device);
184 printf("looking up device: 'module':'printk'\n");
185 device = udev_device_new_from_subsystem_sysname(udev, "module", "printk");
186 if (device == NULL)
188 print_device(device);
189 udev_device_unref(device);
198 struct udev_device *device;
200 device = udev_device_new_from_syspath(udev_enumerate_get_udev(enumerate),
202 if (device != NULL) {
203 printf("device: '%s' (%s)\n",
204 udev_device_get_syspath(device),
205 udev_device_get_subsystem(device));
206 udev_device_unref(device);
264 struct udev_device *device;
273 device = udev_monitor_receive_device(udev_monitor);
274 if (device == NULL) {
275 printf("no device from socket\n");
278 print_device(device);
279 udev_device_unref(device);