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