luxos/Kernel/hal/filesys/fat/fat16.c

28 lines
446 B
C
Raw Normal View History

/*
* fat16.c
*
* Created on: Aug 31, 2011
* Author: Tiberiu
*/
#ifdef NEVER
#include <fileio.h>
#include <memory.h>
#include "fat.h"
uint32 Fat16Detect (DevReadRoutine r, uint32 blocksz)
{
if (!r) return 0;
// Allocate buffer and call read routine
void* buffer = kmalloc(blocksz);
if (!(*r)(0,buffer)) return 0;
// Result of detection
uint32 res = FatDetect(buffer);
// Cleanup
kfree(buffer);
return (res == 16);
}
#endif