reiserfs.c revision 2
2N/A/* reiserfs.c - ReiserFS versions up to 3.6 */
2N/A * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
2N/A# define GRUB_REISERFS_DEBUG
2N/A# define GRUB_REISERFS_JOURNALING
2N/A# define GRUB_HEXDUMP
2N/Astruct grub_reiserfs_superblock
2N/Astruct grub_reiserfs_key
2N/Astruct grub_reiserfs_disk_child
2N/Astruct grub_fshelp_node
2N/Astruct grub_reiserfs_data
2N/Astatic enum grub_reiserfs_item_type
2N/A return GRUB_REISERFS_STAT;
2N/A return GRUB_REISERFS_ANY;
2N/A return GRUB_REISERFS_DIRECTORY;
2N/A return GRUB_REISERFS_DIRECT;
2N/A return GRUB_REISERFS_INDIRECT;
2N/A return GRUB_REISERFS_UNKNOWN;
2N/Astatic enum grub_reiserfs_item_type
2N/A return GRUB_REISERFS_STAT;
2N/A return GRUB_REISERFS_ANY;
2N/A return GRUB_REISERFS_DIRECTORY;
2N/A return GRUB_REISERFS_DIRECT;
2N/A return GRUB_REISERFS_INDIRECT;
2N/A return GRUB_REISERFS_UNKNOWN;
2N/A#ifdef GRUB_HEXDUMP
2N/A grub_size_t a;
2N/A#ifdef GRUB_REISERFS_DEBUG
2N/Astatic grub_uint64_t
2N/Astatic enum grub_reiserfs_item_type
2N/A char *reiserfs_type_strings[] = {
2N/A for (a = 0; a < sizeof (struct grub_reiserfs_key); a++)
2N/Astatic grub_uint64_t
2N/Astatic enum grub_reiserfs_item_type
2N/A case GRUB_REISERFS_STAT:
2N/A case GRUB_REISERFS_ANY:
2N/A case GRUB_REISERFS_DIRECTORY:
2N/A case GRUB_REISERFS_DIRECT:
2N/A case GRUB_REISERFS_INDIRECT:
2N/Astatic grub_err_t
2N/A#ifdef GRUB_REISERFS_DEBUG
2N/A if (! block_header)
2N/A if (grub_errno)
2N/A = ((struct grub_reiserfs_disk_child *)
2N/A i < item_count
2N/A#ifdef GRUB_REISERFS_DEBUG
2N/A#ifdef GRUB_REISERFS_DEBUG
2N/A if (i == item_count
2N/A if (i < item_count)
2N/A i < item_count
2N/A#ifdef GRUB_REISERFS_DEBUG
2N/A if (i < item_count)
2N/A#ifdef GRUB_REISERFS_DEBUG
2N/A sizeof (struct grub_reiserfs_item_header));
2N/A#ifdef GRUB_REISERFS_DEBUG
2N/A return GRUB_ERR_NONE;
2N/A return grub_errno;
2N/A char *symlink_buffer = 0;
2N/A if (! symlink_buffer)
2N/A if (grub_errno)
2N/A return symlink_buffer;
2N/Astatic struct grub_reiserfs_data *
2N/A if (grub_errno)
2N/A int NESTED_FUNC_ATTR
2N/A if (! block_header)
2N/A if (grub_errno)
2N/A = ((struct grub_reiserfs_directory_header *)
2N/A ((char *) block_header
2N/A char *entry_name;
2N/A if (! entry_item)
2N/A != GRUB_ERR_NONE)
2N/A != GRUB_ERR_NONE)
2N/A sizeof (entry_v1_stat),
2N/A (char *) &entry_v1_stat);
2N/A if (grub_errno)
2N/A sizeof (entry_v2_stat),
2N/A (char *) &entry_v2_stat);
2N/A if (grub_errno)
2N/A if (next_offset == 0)
2N/A while (block_number);
2N/Astatic grub_err_t
2N/A if (grub_errno)
2N/A if (grub_errno)
2N/A if (grub_errno)
2N/A return GRUB_ERR_NONE;
2N/A return grub_errno;
2N/Astatic grub_ssize_t
2N/A current_position = 0;
2N/A (unsigned long long) initial_position,
2N/A (unsigned long long) final_position,
2N/A case GRUB_REISERFS_DIRECT:
2N/A if (grub_errno)
2N/A case GRUB_REISERFS_INDIRECT:
2N/A if (! indirect_block_ptr)
2N/A if (grub_errno)
2N/A for (indirect_block = 0;
2N/A if (grub_errno)
2N/A indirect_block_ptr = 0;
2N/A case GRUB_REISERFS_DIRECT:
2N/A if (grub_errno)
2N/A case GRUB_REISERFS_INDIRECT:
2N/A if (!indirect_block_ptr)
2N/A if (grub_errno)
2N/A if (grub_errno)
2N/A return read_length;
2N/Astatic grub_err_t
2N/A return GRUB_ERR_NONE;
2N/Astatic grub_err_t
2N/A if (grub_errno)
2N/A return GRUB_ERR_NONE;
2N/A return grub_errno;
2N/Astatic grub_err_t
2N/A return grub_errno;
2N/Astatic grub_err_t
2N/A return grub_errno;