xref: /rk3399_rockchip-uboot/include/reiserfs.h (revision 518e2e1ae322251f6452c7b413ecdc70c4605fa1)
1*518e2e1aSwdenk /*
2*518e2e1aSwdenk  *  Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README
3*518e2e1aSwdenk  *
4*518e2e1aSwdenk  *  GRUB  --  GRand Unified Bootloader
5*518e2e1aSwdenk  *  Copyright (C) 2000, 2001  Free Software Foundation, Inc.
6*518e2e1aSwdenk  *
7*518e2e1aSwdenk  *  (C) Copyright 2003 Sysgo Real-Time Solutions, AG <www.elinos.com>
8*518e2e1aSwdenk  *  Pavel Bartusek <pba@sysgo.de>
9*518e2e1aSwdenk  *
10*518e2e1aSwdenk  *  This program is free software; you can redistribute it and/or modify
11*518e2e1aSwdenk  *  it under the terms of the GNU General Public License as published by
12*518e2e1aSwdenk  *  the Free Software Foundation; either version 2 of the License, or
13*518e2e1aSwdenk  *  (at your option) any later version.
14*518e2e1aSwdenk  *
15*518e2e1aSwdenk  *  This program is distributed in the hope that it will be useful,
16*518e2e1aSwdenk  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17*518e2e1aSwdenk  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*518e2e1aSwdenk  *  GNU General Public License for more details.
19*518e2e1aSwdenk  *
20*518e2e1aSwdenk  *  You should have received a copy of the GNU General Public License
21*518e2e1aSwdenk  *  along with this program; if not, write to the Free Software
22*518e2e1aSwdenk  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23*518e2e1aSwdenk  */
24*518e2e1aSwdenk 
25*518e2e1aSwdenk /* An implementation for the ReiserFS filesystem ported from GRUB.
26*518e2e1aSwdenk  * Some parts of this code (mainly the structures and defines) are
27*518e2e1aSwdenk  * from the original reiser fs code, as found in the linux kernel.
28*518e2e1aSwdenk  */
29*518e2e1aSwdenk 
30*518e2e1aSwdenk 
31*518e2e1aSwdenk #define SECTOR_SIZE		0x200
32*518e2e1aSwdenk #define SECTOR_BITS		9
33*518e2e1aSwdenk 
34*518e2e1aSwdenk /* Error codes */
35*518e2e1aSwdenk typedef enum
36*518e2e1aSwdenk {
37*518e2e1aSwdenk   ERR_NONE = 0,
38*518e2e1aSwdenk   ERR_BAD_FILENAME,
39*518e2e1aSwdenk   ERR_BAD_FILETYPE,
40*518e2e1aSwdenk   ERR_BAD_GZIP_DATA,
41*518e2e1aSwdenk   ERR_BAD_GZIP_HEADER,
42*518e2e1aSwdenk   ERR_BAD_PART_TABLE,
43*518e2e1aSwdenk   ERR_BAD_VERSION,
44*518e2e1aSwdenk   ERR_BELOW_1MB,
45*518e2e1aSwdenk   ERR_BOOT_COMMAND,
46*518e2e1aSwdenk   ERR_BOOT_FAILURE,
47*518e2e1aSwdenk   ERR_BOOT_FEATURES,
48*518e2e1aSwdenk   ERR_DEV_FORMAT,
49*518e2e1aSwdenk   ERR_DEV_VALUES,
50*518e2e1aSwdenk   ERR_EXEC_FORMAT,
51*518e2e1aSwdenk   ERR_FILELENGTH,
52*518e2e1aSwdenk   ERR_FILE_NOT_FOUND,
53*518e2e1aSwdenk   ERR_FSYS_CORRUPT,
54*518e2e1aSwdenk   ERR_FSYS_MOUNT,
55*518e2e1aSwdenk   ERR_GEOM,
56*518e2e1aSwdenk   ERR_NEED_LX_KERNEL,
57*518e2e1aSwdenk   ERR_NEED_MB_KERNEL,
58*518e2e1aSwdenk   ERR_NO_DISK,
59*518e2e1aSwdenk   ERR_NO_PART,
60*518e2e1aSwdenk   ERR_NUMBER_PARSING,
61*518e2e1aSwdenk   ERR_OUTSIDE_PART,
62*518e2e1aSwdenk   ERR_READ,
63*518e2e1aSwdenk   ERR_SYMLINK_LOOP,
64*518e2e1aSwdenk   ERR_UNRECOGNIZED,
65*518e2e1aSwdenk   ERR_WONT_FIT,
66*518e2e1aSwdenk   ERR_WRITE,
67*518e2e1aSwdenk   ERR_BAD_ARGUMENT,
68*518e2e1aSwdenk   ERR_UNALIGNED,
69*518e2e1aSwdenk   ERR_PRIVILEGED,
70*518e2e1aSwdenk   ERR_DEV_NEED_INIT,
71*518e2e1aSwdenk   ERR_NO_DISK_SPACE,
72*518e2e1aSwdenk   ERR_NUMBER_OVERFLOW,
73*518e2e1aSwdenk 
74*518e2e1aSwdenk   MAX_ERR_NUM
75*518e2e1aSwdenk } reiserfs_error_t;
76*518e2e1aSwdenk 
77*518e2e1aSwdenk 
78*518e2e1aSwdenk extern int reiserfs_set_blk_dev(block_dev_desc_t *rbdd, int part);
79*518e2e1aSwdenk extern int reiserfs_ls (char *dirname);
80*518e2e1aSwdenk extern int reiserfs_open (char *filename);
81*518e2e1aSwdenk extern int reiserfs_read (char *buf, unsigned len);
82*518e2e1aSwdenk extern int reiserfs_mount (unsigned part_length);
83*518e2e1aSwdenk 
84