Newer
Older
ubix / src / sys / ubixfs / ubixfs.c
@reddawg reddawg on 16 May 2002 1 KB Enhancenments for multiuser
/**************************************************************************************
 Copyright (c) 2002 The UbixOS Project
 All rights reserved.

 Redistribution and use in source and binary forms, with or without modification,
 are prohibited.

 $Id$

**************************************************************************************/

#include <ubixfs/ubixfs.h>
#include <drivers/fdc.h>
#include <drivers/video.h>

int startSector;

void initUbixFS() {
  struct bootSect *bs;
  char data[512];
  readBlock(0,data,1);
  bs = (void *)data;
  if ((bs[0].id[0] == 'U') && (bs[0].id[1] == 'b') && (bs[0].id[2] == 'i') && (bs[0].id[3] == 'x') && (bs[0].id[4] == 'F') && (bs[0].id[5] == 'S')) {
    startSector = bs[0].fsStart;
    kprintf("UbixFS Initialized\n");
    }
  else {
    kprintf("Insert System Disk\n");
    initUbixFS();
    }
  }

int readFile(char *file) {
  struct fileTable *ft;
  char data[2048];
  readBlock(startSector,data,4);
  ft = (void *)data;
  return(0);
  }

int findFile(char *file) {
  struct fileTable *ft;
  char data[2048];
  }