getroot.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * GRUB -- GRand Unified Bootloader
  3. * Copyright (C) 1999,2000,2001,2002,2003,2006,2007,2008,2009,2010,2011,2012,2013 Free Software Foundation, Inc.
  4. *
  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.
  9. *
  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.
  14. *
  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/>.
  17. */
  18. #include <config-util.h>
  19. #include <config.h>
  20. #include <sys/stat.h>
  21. #include <sys/types.h>
  22. #include <assert.h>
  23. #include <fcntl.h>
  24. #include <unistd.h>
  25. #include <string.h>
  26. #include <dirent.h>
  27. #include <errno.h>
  28. #include <error.h>
  29. #include <stdio.h>
  30. #include <stdlib.h>
  31. #include <stdint.h>
  32. #ifdef HAVE_LIMITS_H
  33. #include <limits.h>
  34. #endif
  35. #include <grub/types.h>
  36. #include <grub/util/misc.h>
  37. #include <grub/mm.h>
  38. #include <grub/misc.h>
  39. #include <grub/emu/misc.h>
  40. #include <grub/emu/hostdisk.h>
  41. #include <grub/emu/getroot.h>
  42. char *
  43. grub_util_part_to_disk (const char *os_dev,
  44. struct stat *st __attribute__ ((unused)),
  45. int *is_part)
  46. {
  47. *is_part = 0;
  48. return xstrdup (os_dev);
  49. }
  50. enum grub_dev_abstraction_types
  51. grub_util_get_dev_abstraction_os (const char *os_dev __attribute__((unused)))
  52. {
  53. return GRUB_DEV_ABSTRACTION_NONE;
  54. }
  55. int
  56. grub_util_pull_device_os (const char *os_dev __attribute__ ((unused)),
  57. enum grub_dev_abstraction_types ab __attribute__ ((unused)))
  58. {
  59. return 0;
  60. }
  61. char *
  62. grub_util_get_grub_dev_os (const char *os_dev __attribute__ ((unused)))
  63. {
  64. return NULL;
  65. }
  66. grub_disk_addr_t
  67. grub_util_find_partition_start_os (const char *dev __attribute__ ((unused)))
  68. {
  69. return 0;
  70. }