summaryrefslogtreecommitdiffstats
path: root/short/short_unload
diff options
context:
space:
mode:
authorJavier Martinez Canillas <martinez.javier@gmail.com>2010-11-27 07:49:17 +0100
committerJavier Martinez Canillas <martinez.javier@gmail.com>2010-11-27 07:49:17 +0100
commitab121f379a3cff458c90e6f480ba4bb68c8733dd (patch)
treea9851af109ee83646d108bc247d03b131461b764 /short/short_unload
downloadldd3-ab121f379a3cff458c90e6f480ba4bb68c8733dd.tar.gz
Linux Device Drivers 3 examples
Diffstat (limited to 'short/short_unload')
-rw-r--r--short/short_unload16
1 files changed, 16 insertions, 0 deletions
diff --git a/short/short_unload b/short/short_unload
new file mode 100644
index 0000000..7cf64dc
--- /dev/null
+++ b/short/short_unload
@@ -0,0 +1,16 @@
+#!/bin/sh
+module="short"
+device="short"
+
+# invoke rmmod with all arguments we got
+/sbin/rmmod $module $* || exit 1
+
+# Remove stale nodes
+
+rm -f /dev/${device}[0-7] /dev/${device}[0-7][ps] \
+ /dev/${device}int /dev/${device}print
+
+
+
+
+