tcp_cmd
add capability of using ls as well as listfiles
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user