diff options
Diffstat (limited to 'net/sunrpc/xdr.c')
-rw-r--r-- | net/sunrpc/xdr.c | 16 |
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 | } |
31 | EXPORT_SYMBOL(xdr_encode_netobj); | ||
31 | 32 | ||
32 | __be32 * | 33 | __be32 * |
33 | xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj) | 34 | xdr_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 | } |
44 | EXPORT_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 | } |
96 | EXPORT_SYMBOL(xdr_encode_string); | ||
94 | 97 | ||
95 | __be32 * | 98 | __be32 * |
96 | xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen) | 99 | xdr_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 | } |
109 | EXPORT_SYMBOL(xdr_decode_string_inplace); | ||
106 | 110 | ||
107 | void | 111 | void |
108 | xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base, | 112 | xdr_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 | } |
137 | EXPORT_SYMBOL(xdr_encode_pages); | ||
133 | 138 | ||
134 | void | 139 | void |
135 | xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset, | 140 | xdr_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 | 159 | EXPORT_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 | } |
426 | EXPORT_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 | } |
648 | EXPORT_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 | } |
697 | EXPORT_SYMBOL(xdr_buf_subsegment); | ||
690 | 698 | ||
691 | static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len) | 699 | static 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 | } |
728 | EXPORT_SYMBOL(read_bytes_from_xdr_buf); | ||
720 | 729 | ||
721 | static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len) | 730 | static 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 | } |
772 | EXPORT_SYMBOL(xdr_decode_word); | ||
763 | 773 | ||
764 | int | 774 | int |
765 | xdr_encode_word(struct xdr_buf *buf, unsigned int base, u32 obj) | 775 | xdr_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 | } |
781 | EXPORT_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 | } |
819 | EXPORT_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. */ |
810 | static int | 822 | static 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 | } |
1025 | EXPORT_SYMBOL(xdr_decode_array2); | ||
1013 | 1026 | ||
1014 | int | 1027 | int |
1015 | xdr_encode_array2(struct xdr_buf *buf, unsigned int base, | 1028 | xdr_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 | } |
1037 | EXPORT_SYMBOL(xdr_encode_array2); | ||
1024 | 1038 | ||
1025 | int | 1039 | int |
1026 | xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, | 1040 | xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, |