Changeset e160bfe8 in mainline for uspace/app/devctl/devctl.c
- Timestamp:
- 2017-10-23T18:51:34Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 327f147
- Parents:
- 31cca4f3 (diff), 367db39a (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/devctl/devctl.c
r31cca4f3 re160bfe8 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 339 359 static void print_syntax(void) 340 360 { … … 346 366 printf("\tdevctl show-drv <driver-name>\n"); 347 367 printf("\tdevctl load-drv <driver-name>\n"); 368 printf("\tdevctl unload-drv <driver-name>\n"); 348 369 } 349 370 … … 412 433 if (rc != EOK) 413 434 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; 414 445 } else { 415 446 printf(NAME ": Invalid argument '%s'.\n", argv[1]);
Note:
See TracChangeset
for help on using the changeset viewer.