blob: b61bb6006791766b74f9ee5f1f2016263e8d507e [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
wdenk518e2e12004-03-25 14:59:05 +00002/*
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>
wdenk518e2e12004-03-25 14:59:05 +000010 */
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
Simon Glasse6f6f9e2020-05-10 11:39:58 -060021struct blk_desc;
22struct disk_partition;
23
wdenk518e2e12004-03-25 14:59:05 +000024/* Error codes */
25typedef enum
26{
27 ERR_NONE = 0,
28 ERR_BAD_FILENAME,
29 ERR_BAD_FILETYPE,
30 ERR_BAD_GZIP_DATA,
31 ERR_BAD_GZIP_HEADER,
32 ERR_BAD_PART_TABLE,
33 ERR_BAD_VERSION,
34 ERR_BELOW_1MB,
35 ERR_BOOT_COMMAND,
36 ERR_BOOT_FAILURE,
37 ERR_BOOT_FEATURES,
38 ERR_DEV_FORMAT,
39 ERR_DEV_VALUES,
40 ERR_EXEC_FORMAT,
41 ERR_FILELENGTH,
42 ERR_FILE_NOT_FOUND,
43 ERR_FSYS_CORRUPT,
44 ERR_FSYS_MOUNT,
45 ERR_GEOM,
46 ERR_NEED_LX_KERNEL,
47 ERR_NEED_MB_KERNEL,
48 ERR_NO_DISK,
49 ERR_NO_PART,
50 ERR_NUMBER_PARSING,
51 ERR_OUTSIDE_PART,
52 ERR_READ,
53 ERR_SYMLINK_LOOP,
54 ERR_UNRECOGNIZED,
55 ERR_WONT_FIT,
56 ERR_WRITE,
57 ERR_BAD_ARGUMENT,
58 ERR_UNALIGNED,
59 ERR_PRIVILEGED,
60 ERR_DEV_NEED_INIT,
61 ERR_NO_DISK_SPACE,
62 ERR_NUMBER_OVERFLOW,
63
64 MAX_ERR_NUM
65} reiserfs_error_t;
66
67
Simon Glass05289792020-05-10 11:39:57 -060068void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
wdenk518e2e12004-03-25 14:59:05 +000069extern int reiserfs_ls (char *dirname);
70extern int reiserfs_open (char *filename);
71extern int reiserfs_read (char *buf, unsigned len);
72extern int reiserfs_mount (unsigned part_length);