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 struct blk_desc; 22 struct disk_partition; 23 24 /* Error codes */ 25 typedef 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 68 void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info); 69 extern int reiserfs_ls (char *dirname); 70 extern int reiserfs_open (char *filename); 71 extern int reiserfs_read (char *buf, unsigned len); 72 extern int reiserfs_mount (unsigned part_length); 73