Changes in uspace/app/devctl/devctl.c [81685dd9:5c769d54] in mainline
- File:
-
- 1 edited
-
uspace/app/devctl/devctl.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/devctl/devctl.c
r81685dd9 r5c769d54 337 337 } 338 338 339 static int drv_unload(const char *drvname)340 {341 int rc;342 devman_handle_t drvh;343 344 rc = devman_driver_get_handle(drvname, &drvh);345 if (rc != EOK) {346 printf("Failed resolving driver '%s' (%d).\n", drvname, rc);347 return rc;348 }349 350 rc = devman_driver_unload(drvh);351 if (rc != EOK) {352 printf("Failed unloading driver '%s' (%d).\n", drvname, rc);353 return rc;354 }355 356 return EOK;357 }358 359 339 static void print_syntax(void) 360 340 { … … 366 346 printf("\tdevctl show-drv <driver-name>\n"); 367 347 printf("\tdevctl load-drv <driver-name>\n"); 368 printf("\tdevctl unload-drv <driver-name>\n");369 348 } 370 349 … … 433 412 if (rc != EOK) 434 413 return 2; 435 } else if (str_cmp(argv[1], "unload-drv") == 0) {436 if (argc < 3) {437 printf(NAME ": Argument missing.\n");438 print_syntax();439 return 1;440 }441 442 rc = drv_unload(argv[2]);443 if (rc != EOK)444 return 2;445 414 } else { 446 415 printf(NAME ": Invalid argument '%s'.\n", argv[1]);
Note:
See TracChangeset
for help on using the changeset viewer.
