16 #include "lib/random.h"
21 PROCESS(listcoffee_process,
"CFS/Coffee dir list process");
22 AUTOSTART_PROCESSES(&listcoffee_process);
26 int coffee_du(
int *filec,
int *bytes)
29 struct cfs_dirent dirent;
37 dirent.name, (
long)dirent.size);
39 used += (long)dirent.size;
44 printf(
"opendir failed\n");
62 c = coffee_du(&count, &used );
63 printf(
"%d files %d bytes used\n",count, used);
int cfs_opendir(struct cfs_dir *dir, const char *name)
Open a directory for reading directory entries.
#define PROCESS_END()
Define the end of a process.
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
int cfs_readdir(struct cfs_dir *dir, struct cfs_dirent *record)
Read a directory entry.
static volatile clock_time_t count
These routines define the AVR-specific calls declared in /core/sys/clock.h CLOCK_SECOND is the number...
Header for the Coffee file system.
Header file for the CRC16 calculcation
#define PROCESS_BEGIN()
Define the beginning of a process.