diff --git a/examples/thttpd/thttpd_main.c b/examples/thttpd/thttpd_main.c index c5b0711ca..ca7cbbd93 100644 --- a/examples/thttpd/thttpd_main.c +++ b/examples/thttpd/thttpd_main.c @@ -192,9 +192,7 @@ int thttp_main(int argc, char *argv[]) uint8_t mac[IFHWADDRLEN]; #endif char *thttpd_argv = "thttpd"; -#if defined(CONFIG_THTTPD_NXFLAT) || defined(CONFIG_NET_SLIP) int ret; -#endif /* Configure SLIP */ @@ -259,7 +257,7 @@ int thttp_main(int argc, char *argv[]) exit(1); } - /* Mount the file system */ + /* Mount the ROMFS file system */ printf("Mounting ROMFS filesystem at target=%s with source=%s\n", MOUNTPT, ROMFSDEV); @@ -267,12 +265,24 @@ int thttp_main(int argc, char *argv[]) ret = mount(ROMFSDEV, MOUNTPT, "romfs", MS_RDONLY, NULL); if (ret < 0) { - printf("ERROR: mount(%s,%s,romfs) failed: %s\n", + printf("ERROR: mount(%s,%s,romfs) failed: %d\n", ROMFSDEV, MOUNTPT, errno); nxflat_uninitialize(); } #endif +#ifdef CONFIG_THTTPD_BINFS + /* Mount the BINFS file system */ + + printf("Mounting BINFS filesystem at target=%s\n", MOUNTPT); + + ret = mount(NULL, MOUNTPT, "binfs", MS_RDONLY, NULL); + if (ret < 0) + { + printf("ERROR: mount(NULL,%s,binfs) failed: %d\n", MOUNTPT, errno); + } +#endif + /* Start THTTPD. At present, symbol table info is passed via global variables */ #ifdef CONFIG_THTTPD_NXFLAT diff --git a/netutils/thttpd/Makefile b/netutils/thttpd/Makefile index 4bc647357..d9d95620d 100644 --- a/netutils/thttpd/Makefile +++ b/netutils/thttpd/Makefile @@ -157,7 +157,7 @@ endif ifeq ($(CONFIG_THTTPD_BINFS),y) $(BUILTIN_REGISTRY)$(DELIM)phf_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,phf,$(PRIORITY),$(STACKSIZE),php_main) + $(call REGISTER,phf,$(PRIORITY),$(STACKSIZE),phf_main) $(BUILTIN_REGISTRY)$(DELIM)redirect_main.bdat: $(DEPCONFIG) Makefile $(call REGISTER,redirect,$(PRIORITY),$(STACKSIZE),redirect_main) diff --git a/netutils/thttpd/cgi-src/ssi.c b/netutils/thttpd/cgi-src/ssi.c index 34e4000f8..e2374122e 100644 --- a/netutils/thttpd/cgi-src/ssi.c +++ b/netutils/thttpd/cgi-src/ssi.c @@ -496,7 +496,7 @@ static void do_include(FILE *instream, char *vfilename, char *filename, } static void do_echo(FILE *instream, char *vfilename, char *filename, - char *directive, char *tag, char *val) + char *directive, char *tag, char *val) { char *cp; @@ -551,6 +551,7 @@ static void do_echo(FILE *instream, char *vfilename, char *filename, gettimeofday(&tm, NULL); show_time(tm.tv_sec, 1); } +#if 0 /* fstat is not yet supported */ else if (strcmp(val, "LAST_MODIFIED") == 0) { /* The last modification date of the current document. */ @@ -560,6 +561,7 @@ static void do_echo(FILE *instream, char *vfilename, char *filename, show_time(g_sb.st_mtime, 0); } } +#endif else { /* Try an environment variable. */