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

« back to all changes in this revision

Viewing changes to commands/xnu_uuid.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:
100
100
      correct_words[i] = grub_le_to_cpu32 (p[i]);
101
101
  }
102
102
#else
103
 
  grub_memcpy (correct_words, data, 64);
 
103
  memcpy (correct_words, data, 64);
104
104
#endif
105
105
 
106
106
#define OP(a, b, c, d, s, T) \
349
349
  grub_memcpy (hashme.prefix, hash_prefix, sizeof (hashme.prefix));
350
350
 
351
351
  md5 ((char *) &hashme, sizeof (hashme), (char *) xnu_uuid);
 
352
  xnu_uuid[6] = (xnu_uuid[6] & 0xf) | 0x30;
 
353
  xnu_uuid[8] = (xnu_uuid[8] & 0x3f) | 0x80;
352
354
  grub_sprintf (uuid_string,
353
355
                "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
354
356
                (unsigned int) xnu_uuid[0], (unsigned int) xnu_uuid[1],