luxos/Kernel/hal/filesys/fat/fat12.c
Tiberiu Chibici 852cf1bb17 [GOOD] BUILD 0.1.0.590 DATE 9/05/2011 AT 2:40 PM
====================================================
Mainly changed: FS.Initrd
+ (kind of) refractored VFS, bugfixed
+ Rewrote 'initrd' file system, fixed many problems
+ Working 'cat' and 'dir' console commands
+ Wrote 'initrd' image write application (for windows), however it may
be bugged
2021-09-14 18:52:47 +03:00

28 lines
443 B
C

/*
* fat12.c
*
* Created on: Aug 29, 2011
* Author: Tiberiu
*/
#if NEVER
#include <fileio.h>
#include <memory.h>
#include "fat.h"
uint32 Fat12Detect (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 == 12);
}
#endif