Changes in uspace/app/devctl/devctl.c [ce1df04:1a5b252] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/devctl/devctl.c
rce1df04 r1a5b252 44 44 #define MAX_NAME_LENGTH 1024 45 45 46 char name[MAX_NAME_LENGTH];47 char drv_name[MAX_NAME_LENGTH];48 49 46 static int fun_subtree_print(devman_handle_t funh, int lvl) 50 47 { 48 char name[MAX_NAME_LENGTH]; 51 49 devman_handle_t devh; 52 50 devman_handle_t *cfuns; … … 59 57 60 58 rc = devman_fun_get_name(funh, name, MAX_NAME_LENGTH); 61 if (rc != EOK) 62 return ELIMIT; 59 if (rc != EOK) { 60 str_cpy(name, MAX_NAME_LENGTH, "unknown"); 61 return ENOMEM; 62 } 63 63 64 64 if (name[0] == '\0') 65 65 str_cpy(name, MAX_NAME_LENGTH, "/"); 66 66 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); 67 printf("%s (%" PRIun ")\n", name, funh); 75 68 76 69 rc = devman_fun_get_child(funh, &devh); … … 151 144 rc = devman_fun_offline(funh); 152 145 if (rc != EOK) { 153 printf(NAME ": Failed to offline function '%s' (%s)\n", path, 154 str_error(rc)); 146 printf(NAME ": Failed to offline function '%s'.\n", path); 155 147 return rc; 156 148 }
Note:
See TracChangeset
for help on using the changeset viewer.