Changeset b207803 in mainline for uspace/lib/usb/src/recognise.c


Ignore:
Timestamp:
2011-01-10T16:51:13Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ccb15c
Parents:
1ffa73b
Message:

Shorter device names

Automatic names of USB devices in devman uses counter instead of
pointer (see USB Trac, ticket #37).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/recognise.c

    r1ffa73b rb207803  
    346346    usb_address_t address, devman_handle_t *child_handle)
    347347{
     348        static size_t device_name_index = 0;
     349
    348350        device_t *child = NULL;
    349351        char *child_name = NULL;
     
    357359
    358360        /*
    359          * TODO: some better child naming
    360          */
    361         rc = asprintf(&child_name, "usb%p", child);
     361         * TODO: Once the device driver framework support persistent
     362         * naming etc., something more descriptive could be created.
     363         */
     364        rc = asprintf(&child_name, "usbdev%02zu", device_name_index);
    362365        if (rc < 0) {
    363366                goto failure;
     
    381384        }
    382385       
     386        device_name_index++;
     387
    383388        return EOK;
    384389
Note: See TracChangeset for help on using the changeset viewer.