summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2006-12-25 03:48:16 +0000
committerLuca Barbato <lu_zero@gentoo.org>2006-12-25 03:48:16 +0000
commit351894ecacf0d1c69bce1601a511cbf7ecf1c433 (patch)
treee998516f50c12643f9b49f96a458cdd55d043631 /sys-libs/libspe2/files/spe.rc6
downloadcell-351894ecacf0d1c69bce1601a511cbf7ecf1c433.tar.gz
cell-351894ecacf0d1c69bce1601a511cbf7ecf1c433.tar.bz2
cell-351894ecacf0d1c69bce1601a511cbf7ecf1c433.zip
Populating the overlay
svn path=/; revision=1
Diffstat (limited to 'sys-libs/libspe2/files/spe.rc6')
-rw-r--r--sys-libs/libspe2/files/spe.rc639
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-libs/libspe2/files/spe.rc6 b/sys-libs/libspe2/files/spe.rc6
new file mode 100644
index 0000000..cd3870c
--- /dev/null
+++ b/sys-libs/libspe2/files/spe.rc6
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ # you need the elfspe bin
+ need localmount
+}
+
+start() {
+ ebegin "Registering elfspe to binfmt"
+
+ if test -f /proc/sys/fs/binfmt_misc/spe
+ then
+ eerror "elfspe already registered"
+ return 1
+ else
+ if test -f /proc/sys/fs/binfmt_misc/register
+ then
+ echo ':spe:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x17::/usr/bin/elfspe2:' >/proc/sys/fs/binfmt_misc/register
+ eend $?
+ else
+ eerror "binfmt not available"
+ return 1
+ fi
+ fi
+}
+
+stop() {
+ if ! test -f /proc/sys/fs/binfmt_misc/spe
+ then
+ eerror "elfspe not present"
+ return 1
+ else
+ echo -1 > /proc/sys/fs/binfmt_misc/spe
+ eend $?
+ fi
+}