Lines Matching refs:attr

83 dump_attribute(struct device_attr_info *attr, int32 level)
85 if (attr == NULL)
89 printf("\"%s\" : ", attr->name);
90 switch (attr->type) {
92 printf("string : \"%s\"", attr->value.string);
95 printf("uint8 : %" B_PRIu8 " (%#" B_PRIx8 ")", attr->value.ui8,
96 attr->value.ui8);
99 printf("uint16 : %" B_PRIu16 " (%#" B_PRIx16 ")", attr->value.ui16,
100 attr->value.ui16);
103 printf("uint32 : %" B_PRIu32 " (%#" B_PRIx32 ")", attr->value.ui32,
104 attr->value.ui32);
107 printf("uint64 : %" B_PRIu64 " (%#" B_PRIx64 ")", attr->value.ui64,
108 attr->value.ui64);
121 struct device_attr_info attr;
122 attr.cookie = 0;
123 attr.node_cookie = *node;
124 attr.value.raw.data = data;
125 attr.value.raw.length = sizeof(data);
129 while (dm_get_next_attr(&attr) == B_OK) {
130 dump_attribute(&attr, level);
158 struct device_attr_info attr;
186 attr.cookie = 0;
187 attr.node_cookie = *node;
188 attr.value.raw.data = data;
189 attr.value.raw.length = sizeof(data);
191 while (dm_get_next_attr(&attr) == B_OK) {
192 if (!strcmp(attr.name, B_DEVICE_BUS)
193 && attr.type == B_STRING_TYPE) {
194 strlcpy(device_bus, attr.value.string, 64);
195 } else if (!strcmp(attr.name, "scsi/path_id")
196 && attr.type == B_UINT8_TYPE) {
197 scsi_path_id = attr.value.ui8;
198 } else if (!strcmp(attr.name, B_DEVICE_TYPE)
199 && attr.type == B_UINT16_TYPE)
200 pci_class_base_id = attr.value.ui8;
201 else if (!strcmp(attr.name, B_DEVICE_SUB_TYPE)
202 && attr.type == B_UINT16_TYPE)
203 pci_class_sub_id = attr.value.ui8;
204 else if (!strcmp(attr.name, B_DEVICE_INTERFACE)
205 && attr.type == B_UINT16_TYPE)
206 pci_class_api_id = attr.value.ui8;
207 else if (!strcmp(attr.name, B_DEVICE_VENDOR_ID)
208 && attr.type == B_UINT16_TYPE)
209 vendor_id = attr.value.ui16;
210 else if (!strcmp(attr.name, B_DEVICE_ID)
211 && attr.type == B_UINT16_TYPE)
212 device_id = attr.value.ui16;
213 else if (!strcmp(attr.name, SCSI_DEVICE_TARGET_LUN_ITEM)
214 && attr.type == B_UINT8_TYPE)
215 scsi_target_lun = attr.value.ui8;
216 else if (!strcmp(attr.name, SCSI_DEVICE_TARGET_ID_ITEM)
217 && attr.type == B_UINT8_TYPE)
218 scsi_target_id = attr.value.ui8;
219 else if (!strcmp(attr.name, SCSI_DEVICE_TYPE_ITEM)
220 && attr.type == B_UINT8_TYPE)
221 scsi_type = attr.value.ui8;
222 else if (!strcmp(attr.name, SCSI_DEVICE_VENDOR_ITEM)
223 && attr.type == B_STRING_TYPE)
224 strlcpy(scsi_vendor, attr.value.string, 64);
225 else if (!strcmp(attr.name, SCSI_DEVICE_PRODUCT_ITEM)
226 && attr.type == B_STRING_TYPE)
227 strlcpy(scsi_product, attr.value.string, 64);
228 else if (!strcmp(attr.name, USB_DEVICE_CLASS)
229 && attr.type == B_UINT8_TYPE)
230 usb_class_base_id = attr.value.ui8;
231 else if (!strcmp(attr.name, USB_DEVICE_SUBCLASS)
232 && attr.type == B_UINT8_TYPE)
233 usb_class_sub_id = attr.value.ui8;
234 else if (!strcmp(attr.name, USB_DEVICE_PROTOCOL)
235 && attr.type == B_UINT8_TYPE)
236 usb_class_proto_id = attr.value.ui8;
247 /*else if (!strcmp(attr.name, PCI_DEVICE_SUBVENDOR_ID_ITEM)
248 && attr.type == B_UINT16_TYPE)
249 pci_subsystem_vendor_id = attr.value.ui16;
250 else if (!strcmp(attr.name, PCI_DEVICE_SUBSYSTEM_ID_ITEM)
251 && attr.type == B_UINT16_TYPE)
252 pci_subsystem_id = attr.value.ui16;*/
254 attr.value.raw.data = data;
255 attr.value.raw.length = sizeof(data);