Print this page
grub patch

Split Close
Expand all
Collapse all
          --- old/grub/include/grub/zfs/zfs.h
          +++ new/grub/include/grub/zfs/zfs.h
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   12   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   13   *  GNU General Public License for more details.
  14   14   *
  15   15   *  You should have received a copy of the GNU General Public License
  16   16   *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  17   17   */
  18   18   /*
  19   19    * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  20   20    */
       21 +/*
       22 + *  Copyright 2012, Daniil Lunev
       23 + */
  21   24  
  22   25  #ifndef GRUB_ZFS_HEADER
  23   26  #define GRUB_ZFS_HEADER 1
  24   27  
  25   28  #include <grub/err.h>
  26   29  #include <grub/disk.h>
  27   30  #include <grub/crypto.h>
  28   31  
  29   32  typedef enum grub_zfs_endian
  30   33    {
  31   34      GRUB_ZFS_UNKNOWN_ENDIAN = -2,
  32   35      GRUB_ZFS_LITTLE_ENDIAN = -1,
  33   36      GRUB_ZFS_BIG_ENDIAN = 0
  34   37    } grub_zfs_endian_t;
  35   38  
  36   39  /*
  37   40   * On-disk version number.
  38   41   */
  39   42  #define SPA_VERSION                     33ULL
       43 +#define SPA_FEATURE_VERSION             5000ULL
  40   44  
  41   45  /*
  42   46   * The following are configuration names used in the nvlist describing a pool's
  43   47   * configuration.
  44   48   */
  45   49  #define ZPOOL_CONFIG_VERSION            "version"
  46   50  #define ZPOOL_CONFIG_POOL_NAME          "name"
  47   51  #define ZPOOL_CONFIG_POOL_STATE         "state"
  48   52  #define ZPOOL_CONFIG_POOL_TXG           "txg"
  49   53  #define ZPOOL_CONFIG_POOL_GUID          "pool_guid"
↓ open down ↓ 77 lines elided ↑ open up ↑
 127  131  char *grub_zfs_nvlist_lookup_nvlist_array (const char *nvlist,
 128  132                                             const char *name,
 129  133                                             grub_size_t index);
 130  134  int grub_zfs_nvlist_lookup_nvlist_array_get_nelm (const char *nvlist,
 131  135                                                    const char *name);
 132  136  grub_err_t
 133  137  grub_zfs_add_key (grub_uint8_t *key_in,
 134  138                    grub_size_t keylen,
 135  139                    int passphrase);
 136  140  
      141 +grub_err_t
      142 +get_default_bootfs_obj(grub_device_t dev, char * path, grub_uint64_t * mdnobj);
 137  143  extern grub_err_t (*grub_zfs_decrypt) (grub_crypto_cipher_handle_t cipher,
 138  144                                         grub_uint64_t algo,
 139  145                                         void *nonce,
 140  146                                         char *buf, grub_size_t size,
 141  147                                         const grub_uint32_t *expected_mac,
 142  148                                         grub_zfs_endian_t endian);
 143  149  
 144  150  struct grub_zfs_key;
 145  151  
 146  152  extern grub_crypto_cipher_handle_t (*grub_zfs_load_key) (const struct grub_zfs_key *key,
 147  153                                                           grub_size_t keysize,
 148  154                                                           grub_uint64_t salt,
 149  155                                                           grub_uint64_t algo);
 150  156  
 151  157  
 152  158  
 153  159  #endif  /* ! GRUB_ZFS_HEADER */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX