| 508 | MSH_CMD_EXPORT_ALIAS(cmd_mkdir, mkdir, Create the DIRECTORY.); |
| 509 | |
| 510 | static int cmd_mkfs(int argc, char **argv) |
| 511 | { |
| 512 | int result = 0; |
| 513 | char *type = "elm"; /* use the default file system type as 'fatfs' */ |
| 514 | |
| 515 | if (argc == 2) |
| 516 | { |
| 517 | result = dfs_mkfs(type, argv[1]); |
| 518 | } |
| 519 | else if (argc == 4) |
| 520 | { |
| 521 | if (strcmp(argv[1], "-t") == 0) |
| 522 | { |
| 523 | type = argv[2]; |
| 524 | result = dfs_mkfs(type, argv[3]); |
| 525 | } |
| 526 | } |
| 527 | else |
| 528 | { |
| 529 | rt_kprintf("Usage: mkfs [-t type] device\n"); |
| 530 | return 0; |
| 531 | } |
| 532 | |
| 533 | if (result != RT_EOK) |
| 534 | { |
| 535 | rt_kprintf("mkfs failed, result=%d\n", result); |
| 536 | } |
| 537 | |
| 538 | return 0; |
| 539 | } |
| 540 | MSH_CMD_EXPORT_ALIAS(cmd_mkfs, mkfs, format disk with file system); |
| 541 | |
| 542 | /* |
nothing calls this directly
no test coverage detected