svn commit: [25702] trunk/busybox/networking

vda at busybox.net vda at busybox.net
Tue Mar 17 13:03:07 UTC 2009


Author: vda
Date: 2009-03-17 13:03:06 +0000 (Tue, 17 Mar 2009)
New Revision: 25702

Log:
ftpd: document NLST format



Modified:
   trunk/busybox/networking/ftpd.c


Changeset:
Modified: trunk/busybox/networking/ftpd.c
===================================================================
--- trunk/busybox/networking/ftpd.c	2009-03-17 12:40:34 UTC (rev 25701)
+++ trunk/busybox/networking/ftpd.c	2009-03-17 13:03:06 UTC (rev 25702)
@@ -692,6 +692,7 @@
 				 * are fed with ls output with bare '\n'.
 				 * Pity... that would be much simpler.
 				 */
+/* TODO: need to s/LF/NUL/g here */
 				xwrite_str(remote_fd, line);
 				xwrite(remote_fd, "\r\n", 2);
 				free(line);
@@ -710,6 +711,13 @@
 static void
 handle_nlst(void)
 {
+	/* NLST returns list of names, "\r\n" terminated without regard
+	 * to the current binary flag. Names may start with "/",
+	 * then they represent full names (we don't produce such names),
+	 * otherwise names are relative to current directory.
+	 * Embedded "\n" are replaced by NULs. This is safe since names
+	 * can never contain NUL.
+	 */
 	handle_dir_common(0);
 }
 static void



More information about the busybox-cvs mailing list