libzfs.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * GRUB -- GRand Unified Bootloader
  3. * Copyright (C) 2010 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. #ifndef GRUB_LIBZFS_UTIL_HEADER
  19. #define GRUB_LIBZFS_UTIL_HEADER 1
  20. #include <config.h>
  21. #ifdef HAVE_LIBZFS_H
  22. #include <libzfs.h>
  23. #else /* ! HAVE_LIBZFS_H */
  24. #include <grub/util/libnvpair.h>
  25. typedef void libzfs_handle_t;
  26. typedef void zpool_handle_t;
  27. extern libzfs_handle_t *libzfs_init (void);
  28. extern void libzfs_fini (libzfs_handle_t *);
  29. extern zpool_handle_t *zpool_open (libzfs_handle_t *, const char *);
  30. extern void zpool_close (zpool_handle_t *);
  31. extern int zpool_get_physpath (zpool_handle_t *, const char *);
  32. extern nvlist_t *zpool_get_config (zpool_handle_t *, nvlist_t **);
  33. #endif /* ! HAVE_LIBZFS_H */
  34. libzfs_handle_t *grub_get_libzfs_handle (void);
  35. #endif