added function for getting coffee's fd_set address and size

This commit is contained in:
fros4943 2009-01-23 16:27:49 +00:00
parent b258a99e22
commit 7e5047012b
2 changed files with 49 additions and 40 deletions

View file

@ -32,7 +32,7 @@
/** /**
* \file * \file
* Coffee: A flash file system for memory-contrained sensor systems. * Coffee: A flash file system for memory-constrained sensor systems.
* \author * \author
* Nicolas Tsiftes <nvt@sics.se> * Nicolas Tsiftes <nvt@sics.se>
*/ */
@ -46,7 +46,7 @@
#include <limits.h> #include <limits.h>
#include <string.h> #include <string.h>
#define DEBUG 0 #define DEBUG 1
#if DEBUG #if DEBUG
#include <stdio.h> #include <stdio.h>
#define PRINTF(...) printf(__VA_ARGS__) #define PRINTF(...) printf(__VA_ARGS__)
@ -1189,3 +1189,10 @@ cfs_coffee_format(void)
return 0; return 0;
} }
/*---------------------------------------------------------------------------*/
void*
cfs_coffee_get_fd_set(unsigned *size)
{
*size = sizeof(coffee_fd_set);
return &coffee_fd_set;
}

View file

@ -38,6 +38,8 @@
#ifndef CFS_COFFEE_H #ifndef CFS_COFFEE_H
#define CFS_COFFEE_H #define CFS_COFFEE_H
void *cfs_coffee_get_fd_set(unsigned *size);
/** /**
* \file * \file
* Header for the Coffee file system. * Header for the Coffee file system.