~ilya-yanok/ubuntu/precise/grub2/fix-for-948716

« back to all changes in this revision

Viewing changes to disk/lvm.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2009-07-25 19:00:53 UTC
  • mfrom: (1.6.3 upstream)
  • mto: (17.4.13 sid)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: james.westby@ubuntu.com-20090725190053-uv3lm6ya3zxs77ep
ImportĀ upstreamĀ versionĀ 1.96+20090725

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
  dlocn++;
272
272
  mda_offset = grub_le_to_cpu64 (dlocn->offset);
273
273
  mda_size = grub_le_to_cpu64 (dlocn->size);
274
 
 
275
 
  /* It's possible to have multiple copies of metadata areas, we just use the
276
 
     first one.  */
 
274
  dlocn++;
 
275
 
 
276
  if (dlocn->offset)
 
277
    {
 
278
      grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
 
279
                  "We don't support multiple LVM metadata areas");
 
280
 
 
281
      goto fail;
 
282
    }
277
283
 
278
284
  /* Allocate buffer space for the circular worst-case scenario. */
279
285
  metadatabuf = grub_malloc (2 * mda_size);
558
564
      {
559
565
        if (! grub_memcmp (pv->id, pv_id, GRUB_LVM_ID_STRLEN))
560
566
          {
561
 
            /* This could happen to LVM on RAID, pv->disk points to the
562
 
               raid device, we shouldn't change it.  */
563
 
            if (! pv->disk)
564
 
              pv->disk = grub_disk_open (name);
 
567
            pv->disk = grub_disk_open (name);
565
568
            break;
566
569
          }
567
570
      }