Commit 659f129a authored by Nathan Scott's avatar Nathan Scott Committed by Christoph Hellwig

[XFS] Rethink some of those recent types changes slightly.

SGI Modid: 2.5.x-xfs:slinx:132993a
parent 8bd64089
...@@ -72,6 +72,18 @@ ...@@ -72,6 +72,18 @@
#define irix_sgid_inherit xfs_params.sgid_inherit #define irix_sgid_inherit xfs_params.sgid_inherit
#define irix_symlink_mode xfs_params.symlink_mode #define irix_symlink_mode xfs_params.symlink_mode
typedef struct xfs_dirent { /* data from readdir() */
xfs_ino_t d_ino; /* inode number of entry */
xfs_off_t d_off; /* offset of disk directory entry */
unsigned short d_reclen; /* length of this record */
char d_name[1]; /* name of file */
} xfs_dirent_t;
#define DIRENTBASESIZE (((xfs_dirent_t *)0)->d_name - (char *)0)
#define DIRENTSIZE(namelen) \
((DIRENTBASESIZE + (namelen) + \
sizeof(xfs_off_t)) & ~(sizeof(xfs_off_t) - 1))
#define NBPP PAGE_SIZE #define NBPP PAGE_SIZE
#define DPPSHFT (PAGE_SHIFT - 9) #define DPPSHFT (PAGE_SHIFT - 9)
#define NDPP (1 << (PAGE_SHIFT - 9)) #define NDPP (1 << (PAGE_SHIFT - 9))
......
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/time.h> #include <linux/time.h>
typedef struct timespec timespec_t;
static inline void delay(long ticks) static inline void delay(long ticks)
{ {
current->state = TASK_UNINTERRUPTIBLE; current->state = TASK_UNINTERRUPTIBLE;
......
...@@ -112,7 +112,7 @@ uuid_create_nil(uuid_t *uuid) ...@@ -112,7 +112,7 @@ uuid_create_nil(uuid_t *uuid)
memset(uuid, 0, sizeof(*uuid)); memset(uuid, 0, sizeof(*uuid));
} }
boolean_t int
uuid_is_nil(uuid_t *uuid) uuid_is_nil(uuid_t *uuid)
{ {
int i; int i;
...@@ -126,7 +126,7 @@ uuid_is_nil(uuid_t *uuid) ...@@ -126,7 +126,7 @@ uuid_is_nil(uuid_t *uuid)
return B_TRUE; /* is nil */ return B_TRUE; /* is nil */
} }
boolean_t int
uuid_equal(uuid_t *uuid1, uuid_t *uuid2) uuid_equal(uuid_t *uuid1, uuid_t *uuid2)
{ {
return memcmp(uuid1, uuid2, sizeof(uuid_t)) ? B_FALSE : B_TRUE; return memcmp(uuid1, uuid2, sizeof(uuid_t)) ? B_FALSE : B_TRUE;
......
...@@ -32,18 +32,9 @@ ...@@ -32,18 +32,9 @@
#ifndef __XFS_SUPPORT_UUID_H__ #ifndef __XFS_SUPPORT_UUID_H__
#define __XFS_SUPPORT_UUID_H__ #define __XFS_SUPPORT_UUID_H__
typedef enum {
B_FALSE,
B_TRUE
} boolean_t;
typedef struct {
unsigned char __u_bits[16];
} uuid_t;
void uuid_create_nil(uuid_t *uuid); void uuid_create_nil(uuid_t *uuid);
boolean_t uuid_is_nil(uuid_t *uuid); int uuid_is_nil(uuid_t *uuid);
boolean_t uuid_equal(uuid_t *uuid1, uuid_t *uuid2); int uuid_equal(uuid_t *uuid1, uuid_t *uuid2);
void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]); void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]);
__uint64_t uuid_hash64(uuid_t *uuid); __uint64_t uuid_hash64(uuid_t *uuid);
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/types.h>
/* /*
* POSIX Extensions * POSIX Extensions
*/ */
...@@ -54,6 +56,9 @@ typedef unsigned int __uint32_t; ...@@ -54,6 +56,9 @@ typedef unsigned int __uint32_t;
typedef signed long long int __int64_t; typedef signed long long int __int64_t;
typedef unsigned long long int __uint64_t; typedef unsigned long long int __uint64_t;
typedef enum { B_FALSE, B_TRUE } boolean_t;
typedef __int64_t prid_t; /* project ID */ typedef __int64_t prid_t; /* project ID */
typedef __uint32_t inst_t; /* an instruction */ typedef __uint32_t inst_t; /* an instruction */
...@@ -63,17 +68,11 @@ typedef __s64 xfs_daddr_t; /* <disk address> type */ ...@@ -63,17 +68,11 @@ typedef __s64 xfs_daddr_t; /* <disk address> type */
typedef char * xfs_caddr_t; /* <core address> type */ typedef char * xfs_caddr_t; /* <core address> type */
typedef __u32 xfs_dev_t; typedef __u32 xfs_dev_t;
typedef struct xfs_dirent { /* data from readdir() */ typedef struct timespec timespec_t;
xfs_ino_t d_ino; /* inode number of entry */
xfs_off_t d_off; /* offset of disk directory entry */ typedef struct {
unsigned short d_reclen; /* length of this record */ unsigned char __u_bits[16];
char d_name[1]; /* name of file */ } uuid_t;
} xfs_dirent_t;
#define DIRENTBASESIZE (((xfs_dirent_t *)0)->d_name - (char *)0)
#define DIRENTSIZE(namelen) \
((DIRENTBASESIZE + (namelen) + \
sizeof(xfs_off_t)) & ~(sizeof(xfs_off_t) - 1))
/* __psint_t is the same size as a pointer */ /* __psint_t is the same size as a pointer */
#if (BITS_PER_LONG == 32) #if (BITS_PER_LONG == 32)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment