~ubuntu-branches/ubuntu/wily/grub2/wily

« back to all changes in this revision

Viewing changes to grub-core/disk/raid6_recover.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-01-11 17:11:44 UTC
  • mfrom: (1.15.12 upstream)
  • mto: This revision was merged to the branch mainline in revision 60.
  • Revision ID: james.westby@ubuntu.com-20110111171144-c4c3hc0jslqa1bxe
Tags: 1.99~20110111-1
* New Bazaar snapshot.
  - Don't check amount of low memory, as reportedly INT 12h can be broken
    and if low memory is too low we wouldn't have gotten into
    grub_machine_init anyway (closes: #588293, LP: #513528).
  - Submenu default support (LP: #691878).
  - Fix optimisation-dependent grub-mklayout crash (closes: #609584).
* branch_butter.patch: Don't free an uninitialised pointer if /proc is
  unmounted (LP: #697493).
* Add a po/LINGUAS file listing the translations we've synced from the TP
  (closes: #609671).

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
      else
120
120
        {
121
121
          if ((array->members[pos].device) &&
122
 
              (! grub_disk_read (array->members[pos].device, sector,
 
122
              (! grub_disk_read (array->members[pos].device,
 
123
                                 array->members[i].start_sector + sector,
123
124
                                 0, size, buf)))
124
125
            {
125
126
              grub_raid_block_xor (pbuf, buf, size);
150
151
    {
151
152
      /* One bad device */
152
153
      if ((array->members[p].device) &&
153
 
          (! grub_disk_read (array->members[p].device, sector, 0, size, buf)))
 
154
          (! grub_disk_read (array->members[p].device,
 
155
                             array->members[i].start_sector + sector,
 
156
                             0, size, buf)))
154
157
        {
155
158
          grub_raid_block_xor (buf, pbuf, size);
156
159
          goto quit;
163
166
        }
164
167
 
165
168
      grub_errno = GRUB_ERR_NONE;
166
 
      if (grub_disk_read (array->members[q].device, sector, 0, size, buf))
 
169
      if (grub_disk_read (array->members[q].device,
 
170
                          array->members[i].start_sector + sector, 0, size, buf))
167
171
        goto quit;
168
172
 
169
173
      grub_raid_block_xor (buf, qbuf, size);
181
185
          goto quit;
182
186
        }
183
187
 
184
 
      if (grub_disk_read (array->members[p].device, sector, 0, size, buf))
 
188
      if (grub_disk_read (array->members[p].device,
 
189
                          array->members[i].start_sector + sector,
 
190
                          0, size, buf))
185
191
        goto quit;
186
192
 
187
193
      grub_raid_block_xor (pbuf, buf, size);
188
194
 
189
 
      if (grub_disk_read (array->members[q].device, sector, 0, size, buf))
 
195
      if (grub_disk_read (array->members[q].device,
 
196
                          array->members[i].start_sector + sector,
 
197
                          0, size, buf))
190
198
        goto quit;
191
199
 
192
200
      grub_raid_block_xor (qbuf, buf, size);