Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/util-linux/volume_id/linux_raid.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 37  struct mdp_super_block { Line 37  struct mdp_super_block {
37   uint32_t set_uuid1;   uint32_t set_uuid1;
38   uint32_t set_uuid2;   uint32_t set_uuid2;
39   uint32_t set_uuid3;   uint32_t set_uuid3;
40  } __attribute__((packed));  } PACKED;
41    
42  #define MD_RESERVED_BYTES 0x10000  #define MD_RESERVED_BYTES 0x10000
43  #define MD_MAGIC 0xa92b4efc  #define MD_MAGIC 0xa92b4efc
44    
45  int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size)  int FAST_FUNC volume_id_probe_linux_raid(struct volume_id *id /*,uint64_t off*/, uint64_t size)
46  {  {
47    #define off ((uint64_t)0)
48   uint64_t sboff;   uint64_t sboff;
49   uint8_t uuid[16];   uint8_t uuid[16];
50   struct mdp_super_block *mdp;   struct mdp_super_block *mdp;
# Line 62  int volume_id_probe_linux_raid(struct vo Line 63  int volume_id_probe_linux_raid(struct vo
63   if (mdp->md_magic != cpu_to_le32(MD_MAGIC))   if (mdp->md_magic != cpu_to_le32(MD_MAGIC))
64   return -1;   return -1;
65    
66   memcpy(uuid, &mdp->set_uuid0, 4);   *(uint32_t*)uuid = mdp->set_uuid0;
67   memcpy(&uuid[4], &mdp->set_uuid1, 12);   memcpy(&uuid[4], &mdp->set_uuid1, 12);
68   volume_id_set_uuid(id, uuid, UUID_DCE);   volume_id_set_uuid(id, uuid, UUID_DCE);
69    

Legend:
Removed from v.983  
changed lines
  Added in v.984