Changeset 279 for EcnlProtoTool/trunk/ntshell/webserver/httpd-fs.c
- Timestamp:
- Apr 29, 2017, 4:33:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/ntshell/webserver/httpd-fs.c
r270 r279 60 60 #include "kernel_cfg.h" 61 61 #include "syssvc/syslog.h" 62 #include " arduino.h"62 #include "ntstdio.h" 63 63 64 64 #ifndef _MSC_VER … … 96 96 fn = fno.fname; 97 97 if (fno.fattrib & AM_DIR) { 98 sprintf(&path[i], "0:/%s", fn);98 ntstdio_sprintf(&path[i], "0:/%s", fn); 99 99 res = scan_files(path, size); 100 100 if (res != FR_OK) break; … … 112 112 /*-----------------------------------------------------------------------------------*/ 113 113 int 114 httpd_fs_open _ul(char *name, int len, struct httpd_fs_file *file)114 httpd_fs_open(char *name, int len, struct httpd_fs_file *file) 115 115 { 116 116 FRESULT res; … … 157 157 } 158 158 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 /*-----------------------------------------------------------------------------------*/ 160 int 161 httpd_fs_create(char *name, struct httpd_fs_file *file) 175 162 { 176 163 FRESULT res; … … 196 183 } 197 184 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 /*-----------------------------------------------------------------------------------*/ 186 int 187 httpd_fs_read(struct httpd_fs_file *file, void *dst, int len) 214 188 { 215 189 FRESULT ret; … … 236 210 } 237 211 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 /*-----------------------------------------------------------------------------------*/ 213 int 214 httpd_fs_write(struct httpd_fs_file *file, const void *src, int len) 254 215 { 255 216 FRESULT ret; … … 279 240 } 280 241 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 /*-----------------------------------------------------------------------------------*/ 243 int httpd_fs_close(struct httpd_fs_file *file) 296 244 { 297 245 FRESULT ret; … … 307 255 return 1; 308 256 } 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.