Fixed bug that occured after the node had been rebooted.

This commit is contained in:
nvt-se 2008-07-03 22:59:10 +00:00
parent 4687c2c948
commit 379b09d576
1 changed files with 2 additions and 3 deletions

View File

@ -43,7 +43,6 @@
#include "cfs/cfs-coffee.h"
#include "dev/watchdog.h"
#include <stdio.h>
#include <string.h>
#define DEBUG 0
@ -240,10 +239,10 @@ find_file(const char *name)
offset = COFFEE_START;
do {
COFFEE_READ(&hdr, sizeof (hdr), offset);
READ_HEADER(&hdr, offset);
if(COFFEE_PAGE_ACTIVE(hdr)) {
if(strcmp(name, hdr.name) == 0) {
page = offset / COFFEE_PAGE_SIZE;
page = (offset - COFFEE_START) / COFFEE_PAGE_SIZE;
dir_cache_add(name[0], page);
return page;
}