#define _LINUX_NFS_H
#include <linux/sunrpc/msg_prot.h>
+#include <linux/string.h>
#define NFS_PROGRAM 100003
#define NFS_PORT 2049
unsigned char data[NFS_MAXFHSIZE];
};
+/*
+ * Returns a zero iff the size and data fields match.
+ * Checks only "size" bytes in the data field.
+ */
+static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
+{
+ return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
+}
+
+static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
+{
+ target->size = source->size;
+ memcpy(target->data, source->data, source->size);
+}
+
+
/*
* This is really a general kernel constant, but since nothing like
* this is defined in the kernel headers, I have to do it here.