diff options
author | kmacy <kmacy@FreeBSD.org> | 2009-05-28 08:18:12 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2009-05-28 08:18:12 +0000 |
commit | 189b8f192fbe705da700330d0c86ff968666a5da (patch) | |
tree | 9d663c09351ae6cfaccf0cce121db25c8862954d /sys/cddl | |
parent | 7bbd040b3612cb24994e3ecf59cdc5e64dbccec4 (diff) | |
download | FreeBSD-src-189b8f192fbe705da700330d0c86ff968666a5da.zip FreeBSD-src-189b8f192fbe705da700330d0c86ff968666a5da.tar.gz |
MFdevbranch 192944
- add FreeBSD implementation of xdrmem_control needed by zfs
- have zfs define xdr_ops using FreeBSD's definition
- remove solaris xdr files from zfs compile
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.h b/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.h index 75fd1dd..6cb0c6d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.h +++ b/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.h @@ -121,6 +121,7 @@ typedef struct XDR { * Changes must be reviewed by Solaris File Sharing * Changes must be communicated to contract-2003-523@sun.com */ +#ifndef __FreeBSD__ struct xdr_ops { #ifdef __STDC__ #if !defined(_KERNEL) @@ -168,6 +169,28 @@ struct xdr_ops { #endif }; +#else /* FreeBSD */ +struct xdr_ops { + /* get a long from underlying stream */ + bool_t (*x_getint32)(struct XDR *, int32_t *); + /* put a long to " */ + bool_t (*x_putint32)(struct XDR *, const int32_t *); + /* get some bytes from " */ + bool_t (*x_getbytes)(struct XDR *, char *, u_int); + /* put some bytes to " */ + bool_t (*x_putbytes)(struct XDR *, const char *, u_int); + /* returns bytes off from beginning */ + u_int (*x_getpostn)(struct XDR *); + /* lets you reposition the stream */ + bool_t (*x_setpostn)(struct XDR *, u_int); + /* buf quick ptr to buffered data */ + int32_t *(*x_inline)(struct XDR *, u_int); + /* free privates of this xdr_stream */ + void (*x_destroy)(struct XDR *); + bool_t (*x_control)(struct XDR *, int, void *); +}; +#endif + /* * Operations defined on a XDR handle * |