X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=fs%2Freiserfs%2Freiserfs.c;h=635aab2eba7c5e3cf0a5c43c216f28745c9f18ce;hb=b9dd4fabbeed0fcb8bb1811044266d13df8d379f;hp=31c25ebc7b1acf34fb2c8c24b39ab82d7a983614;hpb=04a85b3b36fdbaaac5fa95d61f59f481bbcf7520;p=u-boot diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c index 31c25ebc7b..635aab2eba 100644 --- a/fs/reiserfs/reiserfs.c +++ b/fs/reiserfs/reiserfs.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README * @@ -7,20 +8,6 @@ * (C) Copyright 2003 - 2004 * Sysgo AG, , Pavel Bartusek * - * - * 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. @@ -29,8 +16,6 @@ */ #include -#if (CONFIG_COMMANDS & CFG_CMD_REISER) - #include #include #include @@ -284,6 +269,7 @@ reiserfs_mount (unsigned part_length) { 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), @@ -359,7 +345,8 @@ reiserfs_mount (unsigned part_length) 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", @@ -982,5 +969,3 @@ reiserfs_open (char *filename) } return filemax; } - -#endif /* CFG_CMD_REISER */