Go to the documentation of this file.
  103 kprintf(
"Ouch! in filewrite!\n");
 
  105       fd->
start    = dirEntry->startCluster;
 
  106       fd->
size     = dirEntry->size;
 
  107       fd->
perms    = dirEntry->permissions;
 
  119   int blockCount = 0x0,batIndex = 0x0,batIndexPrev = 0x0;
 
  128   batIndexPrev = fd->
start;
 
  132   blockCount = (offset/4096);
 
  138     if (batIndex == 0x0) {
 
  141     batIndexPrev = batIndex;
 
  149   if (batIndex == 0x0) {
 
  160     fd->
buffer[offset-(blockCount*4096)] = ch;
 
  168     fd->
buffer[offset-(blockCount*4096)] = ch;
 
  205     kpanic(
"ERROR with cache node\n");
 
  209   for (i=0x0; i<size; i++) {
 
  210     if (offset > fd->
size) {
 
  217     data[i] = 
buffer[i + offset];
 
  245   blockIndex = blockIndexPrev = fd->
start;
 
  248   blockOffset = (offset/0x1000);
 
  250   if (fd->
size != 0x0) {
 
  251     for (i = 0x0;i < blockOffset;i++) {
 
  253         if ((
int)blockIndex == 
EOBC) {
 
  259         blockIndexPrev = blockIndex;
 
  266     fd->
buffer[(offset- (blockOffset *0x1000))] = data[i];
 
  269     if (offset%4096 == 0x0) {
 
  274         blockIndexPrev = blockIndex;
 
  316     if ((
int)!
strcmp(dirEntry[x].fileName,path)) {
 
  432     kprintf(
"  Offset: [%i], Partition: [%i]\n",
 
  434     kprintf(
"UbixFS Initialized\n");
 
  438   kprintf(
"Not a valid UbixFS disk.\n");
 
  463     (
void *)openFileUbixFS,       
 
  473     kpanic(
"Unable To Enable UbixFS");
 
  
 
struct cacheNode * cacheNode
int writeFileByte(int ch, fileDescriptor_t *fd, long offset)
void kfree(void *baseAddr)
int strcmp(const char *str1, const char *str2)
struct cacheNode * ubixfs_cacheNew(const char *name)
struct ubixDiskLabel::ubixPartitions partitions[16]
struct ubixDiskLabel * diskLabel
void kpanic(const char *fmt,...)
print panic message and halt system
#define UBIXFS_ALIGN(size)
int writeUbixFS(fileDescriptor_t *fd, char *data, long offset, long size)
int ubixFSmkDir(char *directory, fileDescriptor_t *fd)
void ubixFSUnlink(char *path, struct vfs_mountPoint *mp)
struct vfs_mountPoint * mp
int vfsRegisterFS(struct fileSystem newFS)
register a file system
int readUbixFS(fileDescriptor_t *fd, char *data, uInt32 offset, long size)
#define UBIXFS_BLOCKSIZE_BYTES
int getFreeBlocks(int count, fileDescriptor_t *fd)
int(* write)(void *, void *, uInt32, uInt32)
struct cacheNode * ubixfs_cacheFind(struct cacheNode *head, char *name)
int(* read)(void *, void *, uInt32, uInt32)
struct device_node * device
void * kmalloc(uInt32 len)
struct blockAllocationTableEntry * blockAllocationTable
struct cacheNode * dirCache
struct device_interface * devInfo
int kprintf(const char *,...)
int ubixfs_initialize(struct vfs_mountPoint *mp)