xref: /openbmc/u-boot/include/reiserfs.h (revision 87a62bce)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  *  Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README
4  *
5  *  GRUB  --  GRand Unified Bootloader
6  *  Copyright (C) 2000, 2001  Free Software Foundation, Inc.
7  *
8  *  (C) Copyright 2003 Sysgo Real-Time Solutions, AG <www.elinos.com>
9  *  Pavel Bartusek <pba@sysgo.de>
10  */
11 
12 /* An implementation for the ReiserFS filesystem ported from GRUB.
13  * Some parts of this code (mainly the structures and defines) are
14  * from the original reiser fs code, as found in the linux kernel.
15  */
16 
17 
18 #define SECTOR_SIZE		0x200
19 #define SECTOR_BITS		9
20 
21 /* Error codes */
22 typedef enum
23 {
24   ERR_NONE = 0,
25   ERR_BAD_FILENAME,
26   ERR_BAD_FILETYPE,
27   ERR_BAD_GZIP_DATA,
28   ERR_BAD_GZIP_HEADER,
29   ERR_BAD_PART_TABLE,
30   ERR_BAD_VERSION,
31   ERR_BELOW_1MB,
32   ERR_BOOT_COMMAND,
33   ERR_BOOT_FAILURE,
34   ERR_BOOT_FEATURES,
35   ERR_DEV_FORMAT,
36   ERR_DEV_VALUES,
37   ERR_EXEC_FORMAT,
38   ERR_FILELENGTH,
39   ERR_FILE_NOT_FOUND,
40   ERR_FSYS_CORRUPT,
41   ERR_FSYS_MOUNT,
42   ERR_GEOM,
43   ERR_NEED_LX_KERNEL,
44   ERR_NEED_MB_KERNEL,
45   ERR_NO_DISK,
46   ERR_NO_PART,
47   ERR_NUMBER_PARSING,
48   ERR_OUTSIDE_PART,
49   ERR_READ,
50   ERR_SYMLINK_LOOP,
51   ERR_UNRECOGNIZED,
52   ERR_WONT_FIT,
53   ERR_WRITE,
54   ERR_BAD_ARGUMENT,
55   ERR_UNALIGNED,
56   ERR_PRIVILEGED,
57   ERR_DEV_NEED_INIT,
58   ERR_NO_DISK_SPACE,
59   ERR_NUMBER_OVERFLOW,
60 
61   MAX_ERR_NUM
62 } reiserfs_error_t;
63 
64 
65 void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
66 extern int reiserfs_ls (char *dirname);
67 extern int reiserfs_open (char *filename);
68 extern int reiserfs_read (char *buf, unsigned len);
69 extern int reiserfs_mount (unsigned part_length);
70