Introduction
Introduction Statistics Contact Development Disclaimer Help
Add simevent - smdev - suckless mdev
git clone git://git.suckless.org/smdev
Log
Files
Refs
README
LICENSE
---
commit 6ba112096e874651ad6fcc960fa608c501aaab2d
parent a6903cbf34a395db271573304ab3c5cf931c96f1
Author: sin <[email protected]>
Date: Thu, 22 Aug 2013 16:58:47 +0100
Add simevent
Diffstat:
A simevent | 18 ++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/simevent b/simevent
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Simulate add/remove events by writing directly
+# into the uevent files.
+
+if [[ -z $1 ]]; then
+ echo "usage: $(basename $0) add|remove" 2>&1
+ exit 1
+fi
+
+ev=$1
+for i in $(find /sys/devices -type f); do
+ f=$(basename $i)
+ if [[ $f = "dev" ]]; then
+ d=$(dirname $i)
+ echo $ev > $d/uevent
+ fi
+done
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.