Changeset 90478727 in mainline for uspace/app/devctl/devctl.c


Ignore:
Timestamp:
2012-08-12T11:46:44Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
41b764b7
Parents:
e1e4192 (diff), 371cb6c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/devctl/devctl.c

    re1e4192 r90478727  
    4444#define MAX_NAME_LENGTH 1024
    4545
     46char name[MAX_NAME_LENGTH];
     47char drv_name[MAX_NAME_LENGTH];
     48
    4649static int fun_subtree_print(devman_handle_t funh, int lvl)
    4750{
    48         char name[MAX_NAME_LENGTH];
    4951        devman_handle_t devh;
    5052        devman_handle_t *cfuns;
     
    5759
    5860        rc = devman_fun_get_name(funh, name, MAX_NAME_LENGTH);
    59         if (rc != EOK) {
    60                 str_cpy(name, MAX_NAME_LENGTH, "unknown");
    61                 return ENOMEM;
    62         }
     61        if (rc != EOK)
     62                return ELIMIT;
    6363
    6464        if (name[0] == '\0')
    6565                str_cpy(name, MAX_NAME_LENGTH, "/");
    6666
    67         printf("%s (%" PRIun ")\n", name, funh);
     67        rc = devman_fun_get_driver_name(funh, drv_name, MAX_NAME_LENGTH);
     68        if (rc != EOK && rc != EINVAL)
     69                return ELIMIT;
     70
     71        if (rc == EINVAL)
     72                printf("%s\n", name);
     73        else
     74                printf("%s : %s\n", name, drv_name);
    6875
    6976        rc = devman_fun_get_child(funh, &devh);
Note: See TracChangeset for help on using the changeset viewer.