xref: /rk3399_rockchip-uboot/include/reiserfs.h (revision 650f36641ccfe1c2444277891da7c76cdde99f8b)
1518e2e1aSwdenk /*
2518e2e1aSwdenk  *  Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README
3518e2e1aSwdenk  *
4518e2e1aSwdenk  *  GRUB  --  GRand Unified Bootloader
5518e2e1aSwdenk  *  Copyright (C) 2000, 2001  Free Software Foundation, Inc.
6518e2e1aSwdenk  *
7518e2e1aSwdenk  *  (C) Copyright 2003 Sysgo Real-Time Solutions, AG <www.elinos.com>
8518e2e1aSwdenk  *  Pavel Bartusek <pba@sysgo.de>
9518e2e1aSwdenk  *
10518e2e1aSwdenk  *  This program is free software; you can redistribute it and/or modify
11518e2e1aSwdenk  *  it under the terms of the GNU General Public License as published by
12518e2e1aSwdenk  *  the Free Software Foundation; either version 2 of the License, or
13518e2e1aSwdenk  *  (at your option) any later version.
14518e2e1aSwdenk  *
15518e2e1aSwdenk  *  This program is distributed in the hope that it will be useful,
16518e2e1aSwdenk  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17518e2e1aSwdenk  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18518e2e1aSwdenk  *  GNU General Public License for more details.
19518e2e1aSwdenk  *
20518e2e1aSwdenk  *  You should have received a copy of the GNU General Public License
21518e2e1aSwdenk  *  along with this program; if not, write to the Free Software
22518e2e1aSwdenk  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23518e2e1aSwdenk  */
24518e2e1aSwdenk 
25518e2e1aSwdenk /* An implementation for the ReiserFS filesystem ported from GRUB.
26518e2e1aSwdenk  * Some parts of this code (mainly the structures and defines) are
27518e2e1aSwdenk  * from the original reiser fs code, as found in the linux kernel.
28518e2e1aSwdenk  */
29518e2e1aSwdenk 
30518e2e1aSwdenk 
31518e2e1aSwdenk #define SECTOR_SIZE		0x200
32518e2e1aSwdenk #define SECTOR_BITS		9
33518e2e1aSwdenk 
34518e2e1aSwdenk /* Error codes */
35518e2e1aSwdenk typedef enum
36518e2e1aSwdenk {
37518e2e1aSwdenk   ERR_NONE = 0,
38518e2e1aSwdenk   ERR_BAD_FILENAME,
39518e2e1aSwdenk   ERR_BAD_FILETYPE,
40518e2e1aSwdenk   ERR_BAD_GZIP_DATA,
41518e2e1aSwdenk   ERR_BAD_GZIP_HEADER,
42518e2e1aSwdenk   ERR_BAD_PART_TABLE,
43518e2e1aSwdenk   ERR_BAD_VERSION,
44518e2e1aSwdenk   ERR_BELOW_1MB,
45518e2e1aSwdenk   ERR_BOOT_COMMAND,
46518e2e1aSwdenk   ERR_BOOT_FAILURE,
47518e2e1aSwdenk   ERR_BOOT_FEATURES,
48518e2e1aSwdenk   ERR_DEV_FORMAT,
49518e2e1aSwdenk   ERR_DEV_VALUES,
50518e2e1aSwdenk   ERR_EXEC_FORMAT,
51518e2e1aSwdenk   ERR_FILELENGTH,
52518e2e1aSwdenk   ERR_FILE_NOT_FOUND,
53518e2e1aSwdenk   ERR_FSYS_CORRUPT,
54518e2e1aSwdenk   ERR_FSYS_MOUNT,
55518e2e1aSwdenk   ERR_GEOM,
56518e2e1aSwdenk   ERR_NEED_LX_KERNEL,
57518e2e1aSwdenk   ERR_NEED_MB_KERNEL,
58518e2e1aSwdenk   ERR_NO_DISK,
59518e2e1aSwdenk   ERR_NO_PART,
60518e2e1aSwdenk   ERR_NUMBER_PARSING,
61518e2e1aSwdenk   ERR_OUTSIDE_PART,
62518e2e1aSwdenk   ERR_READ,
63518e2e1aSwdenk   ERR_SYMLINK_LOOP,
64518e2e1aSwdenk   ERR_UNRECOGNIZED,
65518e2e1aSwdenk   ERR_WONT_FIT,
66518e2e1aSwdenk   ERR_WRITE,
67518e2e1aSwdenk   ERR_BAD_ARGUMENT,
68518e2e1aSwdenk   ERR_UNALIGNED,
69518e2e1aSwdenk   ERR_PRIVILEGED,
70518e2e1aSwdenk   ERR_DEV_NEED_INIT,
71518e2e1aSwdenk   ERR_NO_DISK_SPACE,
72518e2e1aSwdenk   ERR_NUMBER_OVERFLOW,
73518e2e1aSwdenk 
74518e2e1aSwdenk   MAX_ERR_NUM
75518e2e1aSwdenk } reiserfs_error_t;
76518e2e1aSwdenk 
77518e2e1aSwdenk 
78*650f3664SRob Herring extern void reiserfs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
79518e2e1aSwdenk extern int reiserfs_ls (char *dirname);
80518e2e1aSwdenk extern int reiserfs_open (char *filename);
81518e2e1aSwdenk extern int reiserfs_read (char *buf, unsigned len);
82518e2e1aSwdenk extern int reiserfs_mount (unsigned part_length);
83