add capability of using ls as well as listfiles
This commit is contained in:
2023-12-08 13:07:29 +01:00
committed by Sander Speetjens
parent 87b6fecfd0
commit 6bc074a033

View File

@@ -328,6 +328,7 @@ static void tcp_cmd_list_files(struct tcp_pcb* pcb, int argc, char** argv) {
} }
LOG_WARN(TAG, "Bad usage of listfiles"); LOG_WARN(TAG, "Bad usage of listfiles");
tcp_cmd_write(pcb, "Usage: listfiles\n"); tcp_cmd_write(pcb, "Usage: listfiles\n");
tcp_cmd_write(pcb, "Usage: ls\n");
return; return;
} }
@@ -474,6 +475,10 @@ static bool tcp_cmd_parser(struct tcp_pcb* pcb, int argc, char** argv) {
tcp_cmd_list_files(pcb, argc, argv); tcp_cmd_list_files(pcb, argc, argv);
return false; return false;
} }
if (strcmp(cmd, "ls") == 0) {
tcp_cmd_list_files(pcb, argc, argv);
return false;
}
if (strcmp(cmd, "setimage") == 0) { if (strcmp(cmd, "setimage") == 0) {
tcp_cmd_set_image(pcb, argc, argv); tcp_cmd_set_image(pcb, argc, argv);
return false; return false;