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

« back to all changes in this revision

Viewing changes to grub-core/disk/mdraid_linux.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:
27
27
/* Linux RAID on disk structures and constants,
28
28
   copied from include/linux/raid/md_p.h.  */
29
29
 
 
30
GRUB_MOD_LICENSE ("GPLv3+");
 
31
 
30
32
#define RESERVED_BYTES                  (64 * 1024)
31
33
#define RESERVED_SECTORS                (RESERVED_BYTES / 512)
32
34
 
202
204
                       "unsupported RAID level: %d", level);
203
205
  if (grub_le_to_cpu32 (sb.this_disk.number) == 0xffff
204
206
      || grub_le_to_cpu32 (sb.this_disk.number) == 0xfffe)
205
 
    return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
 
207
    return grub_error (GRUB_ERR_OUT_OF_RANGE,
206
208
                       "spares aren't implemented");
207
209
 
208
210
  array->name = NULL;
219
221
      return grub_errno;
220
222
 
221
223
  uuid = (grub_uint32_t *) array->uuid;
222
 
  uuid[0] = sb.set_uuid0;
223
 
  uuid[1] = sb.set_uuid1;
224
 
  uuid[2] = sb.set_uuid2;
225
 
  uuid[3] = sb.set_uuid3;
 
224
  uuid[0] = grub_swap_bytes32 (sb.set_uuid0);
 
225
  uuid[1] = grub_swap_bytes32 (sb.set_uuid1);
 
226
  uuid[2] = grub_swap_bytes32 (sb.set_uuid2);
 
227
  uuid[3] = grub_swap_bytes32 (sb.set_uuid3);
226
228
 
227
229
  *start_sector = 0;
228
230