~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to grub-core/fs/zfs/zfs.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-17 23:59:10 UTC
  • mto: (17.3.55 sid)
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: james.westby@ubuntu.com-20110517235910-ma8u889vyjdfro27
Tags: upstream-1.99
ImportĀ upstreamĀ versionĀ 1.99

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
#include <grub/zfs/dsl_dir.h>
53
53
#include <grub/zfs/dsl_dataset.h>
54
54
 
 
55
GRUB_MOD_LICENSE ("GPLv3+");
 
56
 
55
57
#define ZPOOL_PROP_BOOTFS               "bootfs"
56
58
 
57
59
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
161
163
  grub_disk_addr_t vdev_phys_sector;
162
164
};
163
165
 
164
 
decomp_entry_t decomp_table[ZIO_COMPRESS_FUNCTIONS] = {
 
166
static decomp_entry_t decomp_table[ZIO_COMPRESS_FUNCTIONS] = {
165
167
  {"inherit", NULL},            /* ZIO_COMPRESS_INHERIT */
166
168
  {"on", lzjb_decompress},      /* ZIO_COMPRESS_ON */
167
169
  {"off", NULL},                /* ZIO_COMPRESS_OFF */
201
203
}
202
204
 
203
205
/* Checksum Table and Values */
204
 
zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = {
 
206
static zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = {
205
207
  {NULL, 0, 0, "inherit"},
206
208
  {NULL, 0, 0, "on"},
207
209
  {zio_checksum_off, 0, 0, "off"},
837
839
                                name))
838
840
        {
839
841
          struct zap_leaf_array *la;
840
 
          grub_uint8_t *ip;
841
842
 
842
843
          if (le->le_int_size != 8 || le->le_value_length != 1)
843
844
            return grub_error (GRUB_ERR_BAD_FS, "invalid leaf chunk entry");
844
845
 
845
846
          /* get the uint64_t property value */
846
847
          la = &ZAP_LEAF_CHUNK (l, blksft, le->le_value_chunk).l_array;
847
 
          ip = la->la_array;
848
848
 
849
849
          *value = grub_be_to_cpu64 (la->la_array64);
850
850