Skip to content

Commit

Permalink
add bus number and device address display
Browse files Browse the repository at this point in the history
Its useful to show for an enumerated USB device:
 * Device Address assigned
 * on which Bus number

Signed-off-by: Vikram Pandita <vikrampandita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
vikrampandita authored and gregkh committed Dec 3, 2013
1 parent 3da5842 commit bb469f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions usbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ static void PopulateListBox (int deviceId)
sprintf (string, "\nSpeed: %s", tempString);
gtk_text_buffer_insert_at_cursor(textDescriptionBuffer, string,strlen(string));

/* Add Bus number */
sprintf (string, "\nBus:%4d", busNumber);
gtk_text_buffer_insert_at_cursor(textDescriptionBuffer, string,strlen(string));

/* Add device address */
sprintf (string, "\nAddress:%4d", deviceNumber);
gtk_text_buffer_insert_at_cursor(textDescriptionBuffer, string,strlen(string));

/* add ports if available */
if (device->maxChildren) {
sprintf (string, "\nNumber of Ports: %i", device->maxChildren);
Expand Down

0 comments on commit bb469f3

Please sign in to comment.