Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18166
b: refs/heads/master
c: 794fe2d
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Jan 11, 2006
1 parent 8c539c8 commit ab53231
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60a204f096dd67683f3993798e14905ee9828ba5
refs/heads/master: 794fe2dc65f1ec4acacc388053bb52d32d3a932e
23 changes: 14 additions & 9 deletions trunk/fs/xfs/support/uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ uuid_init(void)
mutex_init(&uuid_monitor);
}


/* IRIX interpretation of an uuid_t */
typedef struct {
__be32 uu_timelow;
__be16 uu_timemid;
__be16 uu_timehi;
__be16 uu_clockseq;
__be16 uu_node[3];
} xfs_uu_t;

/*
* uuid_getnodeuniq - obtain the node unique fields of a UUID.
*
Expand All @@ -36,16 +46,11 @@ uuid_init(void)
void
uuid_getnodeuniq(uuid_t *uuid, int fsid [2])
{
char *uu = (char *)uuid;

/* on IRIX, this function assumes big-endian fields within
* the uuid, so we use INT_GET to get the same result on
* little-endian systems
*/
xfs_uu_t *uup = (xfs_uu_t *)uuid;

fsid[0] = (INT_GET(*(u_int16_t*)(uu+8), ARCH_CONVERT) << 16) +
INT_GET(*(u_int16_t*)(uu+4), ARCH_CONVERT);
fsid[1] = INT_GET(*(u_int32_t*)(uu ), ARCH_CONVERT);
fsid[0] = (be16_to_cpu(uup->uu_clockseq) << 16) |
be16_to_cpu(uup->uu_timemid);
fsid[1] = be16_to_cpu(uup->uu_timelow);
}

void
Expand Down

0 comments on commit ab53231

Please sign in to comment.