fsys_jfs.c revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809
/* fsys_jfs.c - an implementation for the IBM JFS file system */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2001,2002 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_JFS
#include "shared.h"
#include "filesys.h"
#include "jfs.h"
#define MAX_LINK_COUNT 8
#define DTTYPE_INLINE 0
#define DTTYPE_PAGE 1
struct jfs_info
{
int bsize;
int l2bsize;
int bdlog;
int xindex;
int xlastindex;
int sindex;
int slastindex;
int de_index;
int dttype;
ldtentry_t *de;
};
{1, -1, 2, {'.', '.'}},
{1, -1, 1, {'.'}}
};
static int
{
}
static xad_t *
{
} else {
do {
}
}
static xad_t *
next_extent (void)
{
} else {
return NULL;
}
}
static void
{
do {
break;
}
} while ((xad = next_extent ()));
}
static ldtentry_t *
next_dentry (void)
{
ldtentry_t *de;
}
} else {
}
}
}
static ldtentry_t *
first_dentry (void)
{
idtentry_t *de;
} else {
for (;;) {
break;
}
}
return next_dentry ();
}
static dtslot_t *
next_dslot (int next)
{
}
static void
{
}
int
jfs_mount (void)
{
struct jfs_superblock super;
sizeof(struct jfs_superblock), (char *)&super)
return 0;
}
return 1;
}
int
{
do {
*buf++ = 0;
}
continue;
}
xad = next_extent ();
}
int
{
ldtentry_t *de;
link_count = 0;
for (;;) {
if (++link_count > MAX_LINK_COUNT) {
return 0;
}
n = di_size;
filepos = 0;
} else {
return 0;
}
linkbuf[n] = 0;
continue;
}
return 0;
}
filepos = 0;
return 1;
}
return 0;
}
*rest = 0;
de = first_dentry ();
for (;;) {
} else {
ptr += DTLHDRDATALEN;
namlen -= DTLHDRDATALEN;
ptr += DTSLOTDATALEN;
namlen -= DTSLOTDATALEN;
}
*ptr = 0;
}
#ifndef STAGE1_5
&& cmp <= 0) {
if (print_possibilities > 0)
} else
#endif
if (cmp == 0) {
parent_inum = inum;
break;
}
de = next_dentry ();
if (print_possibilities < 0)
return 1;
return 0;
}
}
}
}
int
{
struct jfs_superblock super;
if (needed_sectors > 63
sizeof (struct jfs_superblock),
(char *)&super)
return 0;
}
*start_sector = 1;
return 1;
}
#endif /* FSYS_JFS */