diff options
Diffstat (limited to 'arch/powerpc/lib/e2a.c')
-rw-r--r-- | arch/powerpc/lib/e2a.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/lib/e2a.c b/arch/powerpc/lib/e2a.c index 4f88f4cc21e8..4b72ed8fd50e 100644 --- a/arch/powerpc/lib/e2a.c +++ b/arch/powerpc/lib/e2a.c | |||
@@ -103,4 +103,14 @@ unsigned char e2a(unsigned char x) | |||
103 | } | 103 | } |
104 | EXPORT_SYMBOL(e2a); | 104 | EXPORT_SYMBOL(e2a); |
105 | 105 | ||
106 | unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n) | ||
107 | { | ||
108 | int i; | ||
109 | |||
110 | n = strnlen(src, n); | ||
106 | 111 | ||
112 | for (i = 0; i < n; i++) | ||
113 | dest[i] = e2a(src[i]); | ||
114 | |||
115 | return dest; | ||
116 | } | ||