From ab121f379a3cff458c90e6f480ba4bb68c8733dd Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Sat, 27 Nov 2010 07:49:17 +0100 Subject: Linux Device Drivers 3 examples --- scull/scull_unload | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scull/scull_unload (limited to 'scull/scull_unload') diff --git a/scull/scull_unload b/scull/scull_unload new file mode 100644 index 0000000..269a0aa --- /dev/null +++ b/scull/scull_unload @@ -0,0 +1,20 @@ +#!/bin/sh +module="scull" +device="scull" + +# invoke rmmod with all arguments we got +/sbin/rmmod $module $* || exit 1 + +# Remove stale nodes + +rm -f /dev/${device} /dev/${device}[0-3] +rm -f /dev/${device}priv +rm -f /dev/${device}pipe /dev/${device}pipe[0-3] +rm -f /dev/${device}single +rm -f /dev/${device}uid +rm -f /dev/${device}wuid + + + + + -- cgit v1.2.1-18-gbd029