+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README
*
* (C) Copyright 2003 - 2004
* Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
*
- *
- * This program is free software; you can redistribute it and/or modify
- * 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.
*/
/* An implementation for the ReiserFS filesystem ported from GRUB.
*/
#include <common.h>
-#if defined(CONFIG_CMD_REISER)
-
#include <malloc.h>
#include <linux/ctype.h>
#include <linux/time.h>
{
struct reiserfs_super_block super;
int superblock = REISERFS_DISK_OFFSET_IN_BYTES >> SECTOR_BITS;
+ char *cache;
if (part_length < superblock + (sizeof (super) >> SECTOR_BITS)
|| ! reiserfs_devread (superblock, 0, sizeof (struct reiserfs_super_block),
if (! block_read (sb_root_block(&super), 0, INFO->blocksize, (char*) ROOT))
return 0;
- INFO->tree_depth = __le16_to_cpu(BLOCKHEAD (ROOT)->blk_level);
+ cache = ROOT;
+ INFO->tree_depth = __le16_to_cpu(BLOCKHEAD (cache)->blk_level);
#ifdef REISERDEBUG
printf ("root read_in: block=%d, depth=%d\n",
}
return filemax;
}
-
-#endif