/* btrfs.c - B-tree file system. */ /* * VAS_EBOOT -- GRand Unified Bootloader * Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc. * * VAS_EBOOT is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * VAS_EBOOT is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with VAS_EBOOT. If not, see . */ #ifndef VAS_EBOOT_BTRFS_H #define VAS_EBOOT_BTRFS_H 1 enum { VAS_EBOOT_BTRFS_ITEM_TYPE_INODE_ITEM = 0x01, VAS_EBOOT_BTRFS_ITEM_TYPE_INODE_REF = 0x0c, VAS_EBOOT_BTRFS_ITEM_TYPE_DIR_ITEM = 0x54, VAS_EBOOT_BTRFS_ITEM_TYPE_EXTENT_ITEM = 0x6c, VAS_EBOOT_BTRFS_ITEM_TYPE_ROOT_ITEM = 0x84, VAS_EBOOT_BTRFS_ITEM_TYPE_ROOT_BACKREF = 0x90, VAS_EBOOT_BTRFS_ITEM_TYPE_DEVICE = 0xd8, VAS_EBOOT_BTRFS_ITEM_TYPE_CHUNK = 0xe4 }; enum { VAS_EBOOT_BTRFS_ROOT_VOL_OBJECTID = 5, VAS_EBOOT_BTRFS_TREE_ROOT_OBJECTID = 0x100, }; struct VasEBoot_btrfs_root_item { VasEBoot_uint8_t dummy[0xb0]; VasEBoot_uint64_t tree; VasEBoot_uint64_t inode; }; struct VasEBoot_btrfs_key { VasEBoot_uint64_t object_id; VasEBoot_uint8_t type; VasEBoot_uint64_t offset; } VAS_EBOOT_PACKED; struct VasEBoot_btrfs_root_backref { VasEBoot_uint64_t inode_id; VasEBoot_uint64_t seqnr; VasEBoot_uint16_t n; char name[0]; }; struct VasEBoot_btrfs_inode_ref { VasEBoot_uint64_t idxid; VasEBoot_uint16_t n; char name[0]; }; #endif