Opened 11 years ago

Closed 11 years ago

#2666 closed bug (fixed)

listdev does not list the device types anymore (patch)

Reported by: PieterPanman Owned by: jackburton
Priority: normal Milestone: R1
Component: Applications/Command Line Tools Version: R1/pre-alpha1
Keywords: Cc: andreas.faerber@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Attached is a patch that fixes the problem with the device type in the listdev output. See this line:

device Unclassified device (Non-VGA unclassified device) [0|0|0]

For some reason the relevant attributes are now B_UINT16_TYPE instead of B_UINT8_TYPE. It checked for the attribute name and type, so when the type did not match, the true value was not used, but the default 0 was used.

Attachments (1)

listdev.diff (848 bytes) - added by PieterPanman 11 years ago.
listdev patch

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by PieterPanman

Attachment: listdev.diff added

listdev patch

comment:1 Changed 11 years ago by andreasf

Cc: andreas.faerber@… added

comment:2 Changed 11 years ago by jackburton

Owner: changed from axeld to jackburton

Tested ok. Committing.

comment:3 Changed 11 years ago by jackburton

On second thought... how come the types are B_UINT16_TYPE but the code reads

pci_class_api_id = attr.value.ui8 ?

Shouldn't we change it to attr.value.ui16 ?

comment:4 Changed 11 years ago by PieterPanman

I was just typing a message about this, yes, that doesn't make sense at all! If we do that, we should also change their declarations to uint16:

uint8 pci_class_base_id = 0;
uint8 pci_class_sub_id = 0;
uint8 pci_class_api_id = 0;

I'm not sure about the underlying reason for the change of uint8 to uint16, but we should change all 3 properly. Sorry about that :)

comment:5 Changed 11 years ago by jackburton

Resolution: fixed
Status: newclosed

Applied (with the above changes) in hrev27195. Thanks!

Note: See TracTickets for help on using tickets.