aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ifxmips/extract.py
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2010-03-30 21:06:27 +0000
committerJohn Crispin <blogic@openwrt.org>2010-03-30 21:06:27 +0000
commit0e477f3816d2a78936bdbbfbf36bb9bd40bc8aad (patch)
treef43536f6cd2c0f58593b0eab42402e68238501e1 /target/linux/ifxmips/extract.py
parent52c5d88da9e06edcb5d1b2cc3bef42b09e6988dd (diff)
downloadupstream-0e477f3816d2a78936bdbbfbf36bb9bd40bc8aad.tar.gz
upstream-0e477f3816d2a78936bdbbfbf36bb9bd40bc8aad.tar.bz2
upstream-0e477f3816d2a78936bdbbfbf36bb9bd40bc8aad.zip
[ifxmips] prepare kernel for voip
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20613 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ifxmips/extract.py')
-rwxr-xr-xtarget/linux/ifxmips/extract.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/ifxmips/extract.py b/target/linux/ifxmips/extract.py
new file mode 100755
index 0000000000..91b4a578d6
--- /dev/null
+++ b/target/linux/ifxmips/extract.py
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+from sys import stdin, stdout
+while True:
+ c = stdin.read(2)
+ if len(c) < 2:
+ break
+ n1, n2 = ord(c[0]), ord(c[1])
+ stdout.write(chr(((n2 & 15) << 4) + ((n2 & 240) >> 4)))
+ stdout.write(chr(((n1 & 15) << 4) + ((n1 & 240) >> 4)))