~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-01-11 17:11:44 UTC
  • mfrom: (1.17.12 upstream)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 100.
  • 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:
451
451
        for (i = 0; i < diro->inode.data.dir.dirhead.count; i++)
452
452
          {
453
453
            grub_uint64_t ino;
454
 
            void *inopos = (((char *) de)
 
454
            grub_uint8_t *inopos = (((grub_uint8_t *) de)
455
455
                            + sizeof (struct grub_xfs_dir_entry)
456
456
                            + de->len - 1);
457
457
            char name[de->len + 1];
458
458
 
 
459
            /* inopos might be unaligned.  */
459
460
            if (smallino)
460
 
              {
461
 
                ino = grub_be_to_cpu32 (*(grub_uint32_t *) inopos);
462
 
                ino = grub_cpu_to_be64 (ino);
463
 
              }
 
461
              ino = (((grub_uint32_t) inopos[0]) << 24)
 
462
                | (((grub_uint32_t) inopos[1]) << 16)
 
463
                | (((grub_uint32_t) inopos[2]) << 8)
 
464
                | (((grub_uint32_t) inopos[3]) << 0);
464
465
            else
465
 
              ino = *(grub_uint64_t *) inopos;
 
466
              ino = (((grub_uint64_t) inopos[0]) << 56)
 
467
                | (((grub_uint64_t) inopos[1]) << 48)
 
468
                | (((grub_uint64_t) inopos[2]) << 40)
 
469
                | (((grub_uint64_t) inopos[3]) << 32)
 
470
                | (((grub_uint64_t) inopos[4]) << 24)
 
471
                | (((grub_uint64_t) inopos[5]) << 16)
 
472
                | (((grub_uint64_t) inopos[6]) << 8)
 
473
                | (((grub_uint64_t) inopos[7]) << 0);
 
474
            ino = grub_cpu_to_be64 (ino);
466
475
 
467
476
            grub_memcpy (name, de->name, de->len);
468
477
            name[de->len] = '\0';