]> git.sur5r.net Git - u-boot/blobdiff - fs/reiserfs/reiserfs.c
tpm: add PCR authentication commands support
[u-boot] / fs / reiserfs / reiserfs.c
index aa96361638e9320456d4ac0063108eaab0f753c4..635aab2eba7c5e3cf0a5c43c216f28745c9f18ce 100644 (file)
@@ -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, <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.
@@ -29,8 +16,6 @@
  */
 
 #include <common.h>
-#if defined(CONFIG_CMD_REISER)
-
 #include <malloc.h>
 #include <linux/ctype.h>
 #include <linux/time.h>
@@ -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