From 73b9b503fe4137faceb7daa335db7b1131403df3 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 3 Jan 2012 10:18:53 -0300 Subject: [PATCH] m1/patches/rtems/fix-ftpd-root.patch: allow ftpd to start in /ssd/ (by Xiangfu Liu) --- m1/patches/rtems/fix-ftpd-root.patch | 39 ++++++++++++++++++++++++++++ m1/patches/rtems/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 m1/patches/rtems/fix-ftpd-root.patch diff --git a/m1/patches/rtems/fix-ftpd-root.patch b/m1/patches/rtems/fix-ftpd-root.patch new file mode 100644 index 0000000..7eb2674 --- /dev/null +++ b/m1/patches/rtems/fix-ftpd-root.patch @@ -0,0 +1,39 @@ +From: Xiangfu + +Signed-off-by: Xiangfu + +Index: rtems/cpukit/ftpd/ftpd.c +=================================================================== +--- rtems.orig/cpukit/ftpd/ftpd.c 2012-01-03 10:16:17.000000000 -0300 ++++ rtems/cpukit/ftpd/ftpd.c 2012-01-03 10:17:10.000000000 -0300 +@@ -2068,6 +2068,14 @@ + + ftpd_access = rtems_ftpd_configuration.access; + ++ if ( ++ rtems_ftpd_configuration.root && ++ rtems_ftpd_configuration.root[0] == '/' ++ ) ++ ftpd_root = rtems_ftpd_configuration.root; ++ ++ rtems_ftpd_configuration.root = ftpd_root; ++ + if (rtems_ftpd_configuration.tasks_count <= 0) + rtems_ftpd_configuration.tasks_count = 1; + count = rtems_ftpd_configuration.tasks_count; +@@ -2100,15 +2108,6 @@ + return RTEMS_UNSATISFIED; + } + +- ftpd_root = "/"; +- if ( +- rtems_ftpd_configuration.root && +- rtems_ftpd_configuration.root[0] == '/' +- ) +- ftpd_root = rtems_ftpd_configuration.root; +- +- rtems_ftpd_configuration.root = ftpd_root; +- + syslog(LOG_INFO, "ftpd: FTP daemon started (%d session%s max)", + count, ((count > 1) ? "s" : "")); + diff --git a/m1/patches/rtems/series b/m1/patches/rtems/series index a3c6f6d..235db63 100644 --- a/m1/patches/rtems/series +++ b/m1/patches/rtems/series @@ -16,3 +16,4 @@ #fix-timer-includes.patch milkymist-usb-midi.patch #milkymist-midi-opt.patch - applied 2011-12-06 +fix-ftpd-root.patch