Initial commit
Factor out devtomajmin() and devtype()
Set umask to 0
Add mkpath() - a recursive mkdir() implementation

The code was taken from ii[1].

[1] http://git.suckless.org/ii
Factor out regex matching and re-arrange rule parsing
Support @cmd
Add some comments
Call mkpath() with a 022 umask, then restore it to 0
Clean up path parsing
Error out if the path or cmd is invalid
Fix comments
Execute hook on *cmd as well
Change default permissions from 0777 to 0660
Introduce struct Event and add primitive hotplugging support

This unifies the way we handle hotplug events versus static
population of the /dev directory.  We also remove the assumption
for createdev() to only work correctly if the current directory
is set to the corresponding sysfs entry.
Factor out cmd execution to runcmd()
Print an error if the environment is not set up for hotplugging
Fix path parsing
Rename runcmd() to runrule()
Re-arrange includes
Add -pedantic to CFLAGS