From b9113fe6158f9876ea70c5e89c96e8843ded84cb Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 1 Nov 2009 20:58:22 +0000 Subject: [PATCH] Added documentation --- apps/httpserver_raw/fs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/httpserver_raw/fs.c b/apps/httpserver_raw/fs.c index 2e71125..a67eadd 100644 --- a/apps/httpserver_raw/fs.c +++ b/apps/httpserver_raw/fs.c @@ -36,18 +36,19 @@ #include -/*-----------------------------------------------------------------------------------*/ - - -/*-----------------------------------------------------------------------------------*/ +/** Search for a file by its full name and return pointer and length if found. + * + * @param name full file name as passed in HTTP request + * @param file structure that must be allocated by caller and will be filled in + * by the function if the filename was found. + * @return 1 if the file was found, 0 if the file was not found + */ int fs_open(const char *name, struct fs_file *file) { const struct fsdata_file *f; - for(f = FS_ROOT; - f != NULL; - f = f->next) { + for (f = FS_ROOT; f != NULL; f = f->next) { if (!strcmp(name, (const char*)f->name)) { file->data = f->data; file->len = f->len; @@ -56,4 +57,3 @@ fs_open(const char *name, struct fs_file *file) } return 0; } -/*-----------------------------------------------------------------------------------*/