Added directory functions to the Commodore Platform File System.

They reduce the Telnet server's run size by 1231 bytes.
This commit is contained in:
Oliver Schmidt 2016-10-15 16:33:24 +02:00
parent c25e965b0c
commit d864e73579
14 changed files with 636 additions and 19 deletions

View file

@ -29,6 +29,7 @@
* This file is part of the Contiki operating system.
*
* Author: Oliver Schmidt <ol.sc@web.de>
* Author: Greg King <gregdk@users.sf.net>
*
*/
@ -37,11 +38,17 @@
#include <sys/types.h>
struct cfs_dir;
struct cfs_dirent;
int __fastcall__ pfs_open(const char *name, int flags);
void __fastcall__ pfs_close(int fd);
int __fastcall__ pfs_read(int fd, void *buf, unsigned int len);
int __fastcall__ pfs_write(int fd, const void *buf, unsigned int len);
off_t __fastcall__ pfs_seek(int fd, off_t offset, int whence);
int __fastcall__ pfs_remove(const char *name);
int __fastcall__ pfs_opendir(struct cfs_dir *dirp, const char *name);
void __fastcall__ pfs_closedir(struct cfs_dir *dirp);
int __fastcall__ pfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent);
#endif /* PFS_H_ */