Fix cross compilation (e.g. on Darwin). Following changes to make.tmpl,
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / btrfs.h
blob9d93fb6c1826561e4ab15d0a4ce4d2d2368cc9f9
1 /* btrfs.c - B-tree file system. */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GRUB_BTRFS_H
21 #define GRUB_BTRFS_H 1
23 enum
25 GRUB_BTRFS_ITEM_TYPE_INODE_ITEM = 0x01,
26 GRUB_BTRFS_ITEM_TYPE_INODE_REF = 0x0c,
27 GRUB_BTRFS_ITEM_TYPE_DIR_ITEM = 0x54,
28 GRUB_BTRFS_ITEM_TYPE_EXTENT_ITEM = 0x6c,
29 GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM = 0x84,
30 GRUB_BTRFS_ITEM_TYPE_ROOT_BACKREF = 0x90,
31 GRUB_BTRFS_ITEM_TYPE_DEVICE = 0xd8,
32 GRUB_BTRFS_ITEM_TYPE_CHUNK = 0xe4
35 enum
37 GRUB_BTRFS_ROOT_VOL_OBJECTID = 5,
38 GRUB_BTRFS_TREE_ROOT_OBJECTID = 0x100,
41 struct grub_btrfs_root_item
43 grub_uint8_t dummy[0xb0];
44 grub_uint64_t tree;
45 grub_uint64_t inode;
48 struct grub_btrfs_key
50 grub_uint64_t object_id;
51 grub_uint8_t type;
52 grub_uint64_t offset;
53 } GRUB_PACKED;
56 struct grub_btrfs_root_backref
58 grub_uint64_t inode_id;
59 grub_uint64_t seqnr;
60 grub_uint16_t n;
61 char name[0];
64 struct grub_btrfs_inode_ref
66 grub_uint64_t idxid;
67 grub_uint16_t n;
68 char name[0];
71 #endif