Remove coloring from linux build.

Terminate loop when canceling waiting for wifi.
Implement ABOR, HELP, and STAT.
- STAT (no argument) during a transfer gives the current file's offset.
- STAT (no argument) outside of transfer will return server uptime.
- STAT (with argument) is the same as LIST but with the data traveling over the command socket.
Allow ABOR, STAT, and QUIT to occur during transfer.
Support telnet interrupt (discard data up to Data Mark past TCP urgent mark).
Support arguments for LIST and STAT.
Escape \r in response as per telnet standard. Some clients don't like this but they are out of spec.
Unescape \r\0 in request as per telnet standard. Some clients don't properly escape this but they are out of spec.
Support commands broken across multiple recv().
Escape quotes on PWD response.
Added much more documentation.
This commit is contained in:
Michael Theall 2016-01-21 19:25:22 -06:00
parent de29f4a2a7
commit 920cd96c67
6 changed files with 1204 additions and 201 deletions

View File

@ -33,7 +33,7 @@ DATA := data
INCLUDES := include INCLUDES := include
APP_TITLE := Super ftBRONY II Turbo APP_TITLE := Super ftBRONY II Turbo
APP_DESCRIPTION := v2.1 APP_DESCRIPTION := v2.2
APP_AUTHOR := mtheall APP_AUTHOR := mtheall
ICON := ftbrony.png ICON := ftbrony.png
@ -44,7 +44,7 @@ ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard
CFLAGS := -g -Wall -O3 -mword-relocations \ CFLAGS := -g -Wall -O3 -mword-relocations \
$(ARCH) \ $(ARCH) \
-DSTATUS_STRING="\"ftbrony v2.1\"" -DSTATUS_STRING="\"ftbrony v2.2\""
CFLAGS += $(INCLUDE) -DARM11 -D_3DS CFLAGS += $(INCLUDE) -DARM11 -D_3DS

View File

@ -3,7 +3,7 @@ TARGET := $(notdir $(CURDIR))
CFILES := $(wildcard source/*.c) CFILES := $(wildcard source/*.c)
OFILES := $(patsubst source/%,build.linux/%,$(CFILES:.c=.o)) OFILES := $(patsubst source/%,build.linux/%,$(CFILES:.c=.o))
CFLAGS := -g -Wall -Iinclude -DSTATUS_STRING="\"ftpd v2.1\"" CFLAGS := -g -Wall -Iinclude -DSTATUS_STRING="\"ftpd v2.2\""
LDFLAGS := LDFLAGS :=
.PHONY: all clean .PHONY: all clean

View File

@ -23,11 +23,14 @@ Copy the `ftbrony.3dsx` file to your SD card and launch it.
Supported Commands Supported Commands
------------------ ------------------
- ABOR
- ALLO (no-op)
- APPE - APPE
- CDUP - CDUP
- CWD - CWD
- DELE - DELE
- FEAT (no-op) - FEAT
- HELP
- LIST - LIST
- MKD - MKD
- MODE (no-op) - MODE (no-op)
@ -42,7 +45,8 @@ Supported Commands
- RETR - RETR
- RMD - RMD
- RNFR - RNFR
- RNTO (rename syscall is broken?) - RNTO
- STAT
- STOR - STOR
- STRU (no-op) - STRU (no-op)
- SYST - SYST
@ -56,5 +60,4 @@ Supported Commands
Planned Commands Planned Commands
---------------- ----------------
- ALLO
- STOU - STOU

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#ifdef _3DS
#define ESC(x) "\x1b[" #x #define ESC(x) "\x1b[" #x
#define RESET ESC(0m) #define RESET ESC(0m)
#define BLACK ESC(30m) #define BLACK ESC(30m)
@ -10,6 +11,18 @@
#define MAGENTA ESC(35;1m) #define MAGENTA ESC(35;1m)
#define CYAN ESC(36;1m) #define CYAN ESC(36;1m)
#define WHITE ESC(37;1m) #define WHITE ESC(37;1m)
#else
#define ESC(x)
#define RESET
#define BLACK
#define RED
#define GREEN
#define YELLOW
#define BLUE
#define MAGENTA
#define CYAN
#define WHITE
#endif
void console_init(void); void console_init(void);

File diff suppressed because it is too large Load Diff

View File

@ -93,6 +93,8 @@ main(int argc,
/* done with ftp */ /* done with ftp */
ftp_exit(); ftp_exit();
} }
else
status = LOOP_EXIT;
} }
console_print("Press B to exit\n"); console_print("Press B to exit\n");