diff options
Diffstat (limited to 'arch/powerpc/lib')
-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 4f88f4cc21e..4b72ed8fd50 100644 --- a/arch/powerpc/lib/e2a.c +++ b/arch/powerpc/lib/e2a.c @@ -103,4 +103,14 @@ unsigned char e2a(unsigned char x) } EXPORT_SYMBOL(e2a); +unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n) +{ + int i; + + n = strnlen(src, n); + for (i = 0; i < n; i++) + dest[i] = e2a(src[i]); + + return dest; +} |