aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-14 15:39:58 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:28 -0500
commita6eaf8bdf9308b51ec84e358915fc65400029519 (patch)
treef704135c09272357d9e9bf2d2a39636006518c3e /net/sunrpc/xdr.c
parent93a44a75b97b9d8a03dd3d3f3247c3d0ec46aa4c (diff)
SUNRPC: Move exported declarations to the function declarations
Do this for all RPC client related functions and XDR functions. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xdr.c')
-rw-r--r--net/sunrpc/xdr.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index fdc5e6d7562b..54264062ea69 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -28,6 +28,7 @@ xdr_encode_netobj(__be32 *p, const struct xdr_netobj *obj)
28 memcpy(p, obj->data, obj->len); 28 memcpy(p, obj->data, obj->len);
29 return p + XDR_QUADLEN(obj->len); 29 return p + XDR_QUADLEN(obj->len);
30} 30}
31EXPORT_SYMBOL(xdr_encode_netobj);
31 32
32__be32 * 33__be32 *
33xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj) 34xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj)
@@ -40,6 +41,7 @@ xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj)
40 obj->data = (u8 *) p; 41 obj->data = (u8 *) p;
41 return p + XDR_QUADLEN(len); 42 return p + XDR_QUADLEN(len);
42} 43}
44EXPORT_SYMBOL(xdr_decode_netobj);
43 45
44/** 46/**
45 * xdr_encode_opaque_fixed - Encode fixed length opaque data 47 * xdr_encode_opaque_fixed - Encode fixed length opaque data
@@ -91,6 +93,7 @@ xdr_encode_string(__be32 *p, const char *string)
91{ 93{
92 return xdr_encode_array(p, string, strlen(string)); 94 return xdr_encode_array(p, string, strlen(string));
93} 95}
96EXPORT_SYMBOL(xdr_encode_string);
94 97
95__be32 * 98__be32 *
96xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen) 99xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen)
@@ -103,6 +106,7 @@ xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen)
103 *sp = (char *) p; 106 *sp = (char *) p;
104 return p + XDR_QUADLEN(len); 107 return p + XDR_QUADLEN(len);
105} 108}
109EXPORT_SYMBOL(xdr_decode_string_inplace);
106 110
107void 111void
108xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base, 112xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base,
@@ -130,6 +134,7 @@ xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base,
130 xdr->buflen += len; 134 xdr->buflen += len;
131 xdr->len += len; 135 xdr->len += len;
132} 136}
137EXPORT_SYMBOL(xdr_encode_pages);
133 138
134void 139void
135xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset, 140xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset,
@@ -151,7 +156,7 @@ xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset,
151 156
152 xdr->buflen += len; 157 xdr->buflen += len;
153} 158}
154 159EXPORT_SYMBOL(xdr_inline_pages);
155 160
156/* 161/*
157 * Helper routines for doing 'memmove' like operations on a struct xdr_buf 162 * Helper routines for doing 'memmove' like operations on a struct xdr_buf
@@ -418,6 +423,7 @@ xdr_shift_buf(struct xdr_buf *buf, size_t len)
418{ 423{
419 xdr_shrink_bufhead(buf, len); 424 xdr_shrink_bufhead(buf, len);
420} 425}
426EXPORT_SYMBOL(xdr_shift_buf);
421 427
422/** 428/**
423 * xdr_init_encode - Initialize a struct xdr_stream for sending data. 429 * xdr_init_encode - Initialize a struct xdr_stream for sending data.
@@ -639,6 +645,7 @@ xdr_buf_from_iov(struct kvec *iov, struct xdr_buf *buf)
639 buf->page_len = 0; 645 buf->page_len = 0;
640 buf->buflen = buf->len = iov->iov_len; 646 buf->buflen = buf->len = iov->iov_len;
641} 647}
648EXPORT_SYMBOL(xdr_buf_from_iov);
642 649
643/* Sets subbuf to the portion of buf of length len beginning base bytes 650/* Sets subbuf to the portion of buf of length len beginning base bytes
644 * from the start of buf. Returns -1 if base of length are out of bounds. */ 651 * from the start of buf. Returns -1 if base of length are out of bounds. */
@@ -687,6 +694,7 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf,
687 return -1; 694 return -1;
688 return 0; 695 return 0;
689} 696}
697EXPORT_SYMBOL(xdr_buf_subsegment);
690 698
691static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len) 699static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len)
692{ 700{
@@ -717,6 +725,7 @@ int read_bytes_from_xdr_buf(struct xdr_buf *buf, unsigned int base, void *obj, u
717 __read_bytes_from_xdr_buf(&subbuf, obj, len); 725 __read_bytes_from_xdr_buf(&subbuf, obj, len);
718 return 0; 726 return 0;
719} 727}
728EXPORT_SYMBOL(read_bytes_from_xdr_buf);
720 729
721static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len) 730static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len)
722{ 731{
@@ -760,6 +769,7 @@ xdr_decode_word(struct xdr_buf *buf, unsigned int base, u32 *obj)
760 *obj = ntohl(raw); 769 *obj = ntohl(raw);
761 return 0; 770 return 0;
762} 771}
772EXPORT_SYMBOL(xdr_decode_word);
763 773
764int 774int
765xdr_encode_word(struct xdr_buf *buf, unsigned int base, u32 obj) 775xdr_encode_word(struct xdr_buf *buf, unsigned int base, u32 obj)
@@ -768,6 +778,7 @@ xdr_encode_word(struct xdr_buf *buf, unsigned int base, u32 obj)
768 778
769 return write_bytes_to_xdr_buf(buf, base, &raw, sizeof(obj)); 779 return write_bytes_to_xdr_buf(buf, base, &raw, sizeof(obj));
770} 780}
781EXPORT_SYMBOL(xdr_encode_word);
771 782
772/* If the netobj starting offset bytes from the start of xdr_buf is contained 783/* If the netobj starting offset bytes from the start of xdr_buf is contained
773 * entirely in the head or the tail, set object to point to it; otherwise 784 * entirely in the head or the tail, set object to point to it; otherwise
@@ -805,6 +816,7 @@ int xdr_buf_read_netobj(struct xdr_buf *buf, struct xdr_netobj *obj, unsigned in
805 __read_bytes_from_xdr_buf(&subbuf, obj->data, obj->len); 816 __read_bytes_from_xdr_buf(&subbuf, obj->data, obj->len);
806 return 0; 817 return 0;
807} 818}
819EXPORT_SYMBOL(xdr_buf_read_netobj);
808 820
809/* Returns 0 on success, or else a negative error code. */ 821/* Returns 0 on success, or else a negative error code. */
810static int 822static int
@@ -1010,6 +1022,7 @@ xdr_decode_array2(struct xdr_buf *buf, unsigned int base,
1010 1022
1011 return xdr_xcode_array2(buf, base, desc, 0); 1023 return xdr_xcode_array2(buf, base, desc, 0);
1012} 1024}
1025EXPORT_SYMBOL(xdr_decode_array2);
1013 1026
1014int 1027int
1015xdr_encode_array2(struct xdr_buf *buf, unsigned int base, 1028xdr_encode_array2(struct xdr_buf *buf, unsigned int base,
@@ -1021,6 +1034,7 @@ xdr_encode_array2(struct xdr_buf *buf, unsigned int base,
1021 1034
1022 return xdr_xcode_array2(buf, base, desc, 1); 1035 return xdr_xcode_array2(buf, base, desc, 1);
1023} 1036}
1037EXPORT_SYMBOL(xdr_encode_array2);
1024 1038
1025int 1039int
1026xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, 1040xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len,