Ignore:
Timestamp:
Apr 29, 2017, 4:33:37 PM (7 years ago)
Author:
coas-nagasima
Message:

ファイルを追加、更新。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/ntshell/webserver/httpd-fs.c

    r270 r279  
    6060#include "kernel_cfg.h"
    6161#include "syssvc/syslog.h"
    62 #include "arduino.h"
     62#include "ntstdio.h"
    6363
    6464#ifndef _MSC_VER
     
    9696                        fn = fno.fname;
    9797                        if (fno.fattrib & AM_DIR) {
    98                                 sprintf(&path[i], "0:/%s", fn);
     98                                ntstdio_sprintf(&path[i], "0:/%s", fn);
    9999                                res = scan_files(path, size);
    100100                                if (res != FR_OK) break;
     
    112112/*-----------------------------------------------------------------------------------*/
    113113int
    114 httpd_fs_open_ul(char *name, int len, struct httpd_fs_file *file)
     114httpd_fs_open(char *name, int len, struct httpd_fs_file *file)
    115115{
    116116        FRESULT res;
     
    157157}
    158158
    159 int
    160 httpd_fs_open(char *name, int len, struct httpd_fs_file *file)
    161 {
    162         int result;
    163 
    164         wai_sem(SEM_FILESYSTEM);
    165 
    166         result = httpd_fs_open_ul(name, len, file);
    167 
    168         sig_sem(SEM_FILESYSTEM);
    169 
    170         return result;
    171 }
    172 /*-----------------------------------------------------------------------------------*/
    173 int
    174 httpd_fs_create_ul(char *name, struct httpd_fs_file *file)
     159/*-----------------------------------------------------------------------------------*/
     160int
     161httpd_fs_create(char *name, struct httpd_fs_file *file)
    175162{
    176163        FRESULT res;
     
    196183}
    197184
    198 int
    199 httpd_fs_create(char *name, struct httpd_fs_file *file)
    200 {
    201         int result;
    202 
    203         wai_sem(SEM_FILESYSTEM);
    204 
    205         result = httpd_fs_create_ul(name, file);
    206 
    207         sig_sem(SEM_FILESYSTEM);
    208 
    209         return result;
    210 }
    211 /*-----------------------------------------------------------------------------------*/
    212 int
    213 httpd_fs_read_ul(struct httpd_fs_file *file, void *dst, int len)
     185/*-----------------------------------------------------------------------------------*/
     186int
     187httpd_fs_read(struct httpd_fs_file *file, void *dst, int len)
    214188{
    215189        FRESULT ret;
     
    236210}
    237211
    238 int
    239 httpd_fs_read(struct httpd_fs_file *file, void *dst, int len)
    240 {
    241         int result;
    242 
    243         wai_sem(SEM_FILESYSTEM);
    244 
    245         result = httpd_fs_read_ul(file, dst, len);
    246 
    247         sig_sem(SEM_FILESYSTEM);
    248 
    249         return result;
    250 }
    251 /*-----------------------------------------------------------------------------------*/
    252 int
    253 httpd_fs_write_ul(struct httpd_fs_file *file, const void *src, int len)
     212/*-----------------------------------------------------------------------------------*/
     213int
     214httpd_fs_write(struct httpd_fs_file *file, const void *src, int len)
    254215{
    255216        FRESULT ret;
     
    279240}
    280241
    281 int
    282 httpd_fs_write(struct httpd_fs_file *file, const void *src, int len)
    283 {
    284         int result;
    285 
    286         wai_sem(SEM_FILESYSTEM);
    287 
    288         result = httpd_fs_write_ul(file, src, len);
    289 
    290         sig_sem(SEM_FILESYSTEM);
    291 
    292         return result;
    293 }
    294 /*-----------------------------------------------------------------------------------*/
    295 int httpd_fs_close_ul(struct httpd_fs_file *file)
     242/*-----------------------------------------------------------------------------------*/
     243int httpd_fs_close(struct httpd_fs_file *file)
    296244{
    297245        FRESULT ret;
     
    307255        return 1;
    308256}
    309 
    310 int httpd_fs_close(struct httpd_fs_file *file)
    311 {
    312         int result;
    313 
    314         wai_sem(SEM_FILESYSTEM);
    315 
    316         result = httpd_fs_close_ul(file);
    317 
    318         sig_sem(SEM_FILESYSTEM);
    319 
    320         return result;
    321 }
Note: See TracChangeset for help on using the changeset viewer.