Changeset e5556e4a in mainline for uspace/app/devctl/devctl.c
- Timestamp:
- 2013-09-11T09:46:38Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7969087
- Parents:
- 4c6ade6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/devctl/devctl.c
r4c6ade6 re5556e4a 162 162 { 163 163 devman_handle_t *drvs; 164 driver_state_t state; 165 const char *sstate; 164 166 size_t ndrvs; 165 167 size_t i; … … 170 172 return rc; 171 173 172 printf("Got %d handles\n", ndrvs);173 174 for (i = 0; i < ndrvs; i++) { 174 175 rc = devman_driver_get_name(drvs[i], drv_name, MAX_NAME_LENGTH); 175 176 if (rc != EOK) 176 177 continue; 177 printf("%3d %s\n", (int)drvs[i], drv_name); 178 rc = devman_driver_get_state(drvs[i], &state); 179 if (rc != EOK) 180 continue; 181 switch (state) { 182 case DRIVER_NOT_STARTED: 183 sstate = "not started"; 184 break; 185 case DRIVER_STARTING: 186 sstate = "starting"; 187 break; 188 case DRIVER_RUNNING: 189 sstate = "running"; 190 break; 191 default: 192 sstate = "unknown"; 193 } 194 printf("%3d %-10s %s\n", (int)drvs[i], drv_name, sstate); 178 195 } 179 196 free(drvs);
Note:
See TracChangeset
for help on using the changeset viewer.