# ffs.c

Go to the documentation of this file.

    00001 #include <vfs/vfs.h>
    00002 #include <ufs/ufs.h>
    00003 #include <ufs/ffs.h>
    00004 #include <lib/kprintf.h>
    00005 #include <lib/kmalloc.h>
    00006 #include <ubixos/kpanic.h>
    00007 #include <lib/string.h>
    00008 #include <sys/buf.h>
    00009
    00010
    00011 int ffs_read(fileDescriptor *fd,char *data,uInt32 offset,long size) {
    00012   struct fs  *fs;
    00013
    00014   fs = (struct fs *)fd->dmadat->sbbuf;
    00015
    00016   if (offset < fd->size && offset >= fs->fs_maxfilesize) {
    00017     //return (EOVERFLOW);
    00018     return(-1);
    00019     }
    00020
    00021   kprintf("Reading File w/ New Function [0x%X]\n",fs->fs_maxfilesize);
    00022   return(0x0);
    00023   }