Skip to content

Commit 023d022

Browse files
Cleaned up mount code
1 parent 5f00e77 commit 023d022

File tree

1 file changed

+6
-2
lines changed
  • source/kernel/C/shell/commands

1 file changed

+6
-2
lines changed

source/kernel/C/shell/commands/mount.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@
1616

1717
int cmd_mount(int argc, char** argv)
1818
{
19-
if (argc < 3) {
20-
printf("Usage: mount <device> <mount_point>");
19+
if(argc == 1){
2120
list_all_mounts();
2221
return 0;
2322
}
2423

24+
if (argc < 3) {
25+
printf("Usage: mount <device> <mount_point>");
26+
return -1;
27+
}
28+
2529
const char* device = argv[1];
2630
const char* mount_point = argv[2];
2731

0 commit comments

Comments
 (0)