fsys_vstafs.c revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef FSYS_VSTAFS
#include "shared.h"
#include "filesys.h"
#include "vstafs.h"
static void get_file_info (int sector);
static struct dir_entry *vstafs_nextdir (void);
#define ROOT_SECTOR 1
/*
* In f_sector we store the sector number in which the information about
* the found file is.
*/
extern int filepos;
static int f_sector;
int
vstafs_mount (void)
{
int retval = 1;
retval = 0;
return retval;
}
static void
get_file_info (int sector)
{
}
static struct alloc *a;
static struct dir_entry *
vstafs_readdir (long sector)
{
/*
* Get some information from the current directory
*/
{
return 0;
}
curr_ext = 0;
current_direntry = 11;
current_blockpos = 0;
return &DIRECTORY_BUF[10];
}
static struct dir_entry *
vstafs_nextdir (void)
{
if (current_direntry > 15)
{
current_direntry = 0;
{
current_blockpos = 0;
curr_ext++;
}
{
512, (char *) DIRECTORY_BUF);
}
else
{
/* errnum =ERR_FILE_NOT_FOUND; */
return 0;
}
}
return &DIRECTORY_BUF[current_direntry++];
}
int
vstafs_dir (char *dirname)
{
struct dir_entry *d;
/* int l, i, s; */
/*
* Read in the entries of the current directory.
*/
do
{
if (! (d = vstafs_readdir (f_sector)))
{
return 0;
}
/*
* Find the file in the path
*/
*fn = 0;
do
{
continue;
#ifndef STAGE1_5
{
if (print_possibilities > 0)
}
#endif
{
break;
}
}
while ((d =vstafs_nextdir ()));
if (! d)
{
if (print_possibilities < 0)
{
putchar ('\n');
return 1;
}
return 0;
}
}
return 1;
}
int
{
struct alloc *a;
int curr_ext;
char extent;
int ext_size;
char *curr_pos;
if (filepos > 0)
{
{
extent = 0;
}
else
{
extent = 1;
do
{
}
}
}
else
{
extent = 0;
}
{
if (size < 0)
{
}
offset = 0;
}
return ret;
}
#endif /* FSYS_VSTAFS */