Fix cross compilation (e.g. on Darwin). Following changes to make.tmpl,
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / emu / getroot.h
blob73fa2d34abb656c7a89bfde25cf717178501ab0f
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2003, 2007, 2008, 2009 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_UTIL_GETROOT_HEADER
20 #define GRUB_UTIL_GETROOT_HEADER 1
22 #include <grub/types.h>
23 #include <grub/device.h>
25 #include <sys/types.h>
26 #include <stdio.h>
28 enum grub_dev_abstraction_types {
29 GRUB_DEV_ABSTRACTION_NONE,
30 GRUB_DEV_ABSTRACTION_LVM,
31 GRUB_DEV_ABSTRACTION_RAID,
32 GRUB_DEV_ABSTRACTION_LUKS,
33 GRUB_DEV_ABSTRACTION_GELI,
36 char *grub_find_device (const char *dir, dev_t dev);
37 void grub_util_pull_device (const char *osname);
38 char **grub_guess_root_devices (const char *dir);
39 int grub_util_get_dev_abstraction (const char *os_dev);
40 char *grub_make_system_path_relative_to_its_root (const char *path);
41 char *
42 grub_make_system_path_relative_to_its_root_os (const char *path);
43 char *grub_util_get_grub_dev (const char *os_dev);
44 #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
45 void grub_util_follow_gpart_up (const char *name, grub_disk_addr_t *off_out,
46 char **name_out);
47 #endif
49 #include <sys/stat.h>
51 #ifdef __linux__
52 char **
53 grub_find_root_devices_from_mountinfo (const char *dir, char **relroot);
54 #endif
56 /* Devmapper functions provided by getroot_devmapper.c. */
57 void
58 grub_util_pull_devmapper (const char *os_dev);
59 int
60 grub_util_device_is_mapped_stat (struct stat *st);
61 void grub_util_devmapper_cleanup (void);
62 enum grub_dev_abstraction_types
63 grub_util_get_dm_abstraction (const char *os_dev);
64 char *
65 grub_util_get_vg_uuid (const char *os_dev);
66 char *
67 grub_util_devmapper_part_to_disk (struct stat *st,
68 int *is_part, const char *os_dev);
69 char *
70 grub_util_get_devmapper_grub_dev (const char *os_dev);
72 void
73 grub_util_pull_lvm_by_command (const char *os_dev);
74 char **
75 grub_util_find_root_devices_from_poolname (char *poolname);
77 grub_disk_addr_t
78 grub_util_find_partition_start (const char *dev);
80 /* OS-specific functions provided by getroot_*.c. */
81 enum grub_dev_abstraction_types
82 grub_util_get_dev_abstraction_os (const char *os_dev);
83 char *
84 grub_util_part_to_disk (const char *os_dev, struct stat *st,
85 int *is_part);
86 int
87 grub_util_pull_device_os (const char *osname,
88 enum grub_dev_abstraction_types ab);
89 char *
90 grub_util_get_grub_dev_os (const char *os_dev);
91 grub_disk_addr_t
92 grub_util_find_partition_start_os (const char *dev);
94 char *
95 grub_util_guess_bios_drive (const char *orig_path);
96 char *
97 grub_util_guess_efi_drive (const char *orig_path);
98 char *
99 grub_util_guess_baremetal_drive (const char *orig_path);
100 void
101 grub_util_fprint_full_disk_name (FILE *f,
102 const char *drive, grub_device_t dev);
104 #endif /* ! GRUB_UTIL_GETROOT_HEADER */