Changeset 3f57fb7 in mainline for uspace/app/devctl/devctl.c
- Timestamp:
- 2012-06-13T21:44:47Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a3fcfba
- Parents:
- 375e501
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/devctl/devctl.c
r375e501 r3f57fb7 44 44 #define MAX_NAME_LENGTH 1024 45 45 46 char name[MAX_NAME_LENGTH]; 47 char drv_name[MAX_NAME_LENGTH]; 48 46 49 static int fun_subtree_print(devman_handle_t funh, int lvl) 47 50 { 48 char name[MAX_NAME_LENGTH];49 51 devman_handle_t devh; 50 52 devman_handle_t *cfuns; … … 57 59 58 60 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; 63 63 64 64 if (name[0] == '\0') 65 65 str_cpy(name, MAX_NAME_LENGTH, "/"); 66 66 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); 68 75 69 76 rc = devman_fun_get_child(funh, &devh);
Note:
See TracChangeset
for help on using the changeset viewer.