mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
Continued THTTPD debug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2023 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+5
-3
@@ -89,11 +89,13 @@ static inline int statpsuedo(FAR struct inode *inode, FAR struct stat *buf)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* If it has no operations, then it must just be a intermeidate
|
/* If it has no operations, then it must just be a intermediate
|
||||||
* node in the inode tree. It is something like a directory.
|
* node in the inode tree. It is something like a directory.
|
||||||
|
* We'll say that all psuedo-directories are read-able but not
|
||||||
|
* write-able.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buf->st_mode |= S_IFDIR;
|
buf->st_mode |= S_IFDIR|S_IROTH|S_IRGRP|S_IRUSR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
@@ -108,7 +110,7 @@ static inline int statroot(FAR struct stat *buf)
|
|||||||
/* There is no inode associated with the fake root directory */
|
/* There is no inode associated with the fake root directory */
|
||||||
|
|
||||||
memset(buf, 0, sizeof(struct stat) );
|
memset(buf, 0, sizeof(struct stat) );
|
||||||
buf->st_mode = S_IFDIR;
|
buf->st_mode = S_IFDIR|S_IROTH|S_IRGRP|S_IRUSR;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+343
-337
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
#include "tdate_parse.h"
|
#include "tdate_parse.h"
|
||||||
|
|
||||||
@@ -170,6 +171,7 @@ static int scan_mon(char *str_mon, long *tm_monP)
|
|||||||
|
|
||||||
time_t tdate_parse(char *str)
|
time_t tdate_parse(char *str)
|
||||||
{
|
{
|
||||||
|
#if 0 // REVISIT -- doesn't work
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
char *cp;
|
char *cp;
|
||||||
char str_mon[32];
|
char str_mon[32];
|
||||||
@@ -184,7 +186,10 @@ time_t tdate_parse(char *str)
|
|||||||
long tm_wday;
|
long tm_wday;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
nvdbg("str: \"%s\"\n", str);
|
||||||
|
|
||||||
/* Initialize. */
|
/* Initialize. */
|
||||||
|
|
||||||
(void)memset((char *)&tm, 0, sizeof(struct tm));
|
(void)memset((char *)&tm, 0, sizeof(struct tm));
|
||||||
|
|
||||||
/* Skip initial whitespace ourselves - sscanf is clumsy at this. */
|
/* Skip initial whitespace ourselves - sscanf is clumsy at this. */
|
||||||
@@ -315,5 +320,8 @@ time_t tdate_parse(char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return mktime(&tm);
|
return mktime(&tm);
|
||||||
|
#else
|
||||||
|
return 0; // for now
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user