smdev

suckless mdev
git clone git://git.2f30.org/smdev.git
Log | Files | Refs | README | LICENSE

commit 920c9b0caca0a9c372760b1bda223db3279068d8
parent 18be0760ce0ff089f6bfe802b81ef7fd8f6c7cd0
Author: sin <sin@2f30.org>
Date:   Fri Feb 14 10:46:40 +0000

Use config.def.h instead of config.h

Diffstat:
Makefile | 6+++++-
config.def.h | 26++++++++++++++++++++++++++
config.h | 26--------------------------
3 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/Makefile b/Makefile @@ -32,7 +32,11 @@ binlib: util.a bin: $(BIN) -$(OBJ): util.h config.mk +$(OBJ): config.h util.h config.mk + +config.h: + @echo creating $@ from config.def.h + @cp config.def.h $@ .o: @echo LD $@ diff --git a/config.def.h b/config.def.h @@ -0,0 +1,26 @@ +/* See LICENSE file for copyright and license details. */ +struct rule { + const char *devregex; + const char *user; + const char *group; + int mode; + const char *path; + const char *cmd; +} rules[] = { + { "null", "root", "root", 0666, NULL, "@chmod 666 $SMDEV" }, + { "zero", "root", "root", 0666, NULL, NULL }, + { "full", "root", "root", 0666, NULL, NULL }, + { "random", "root", "root", 0666, NULL, NULL }, + { "urandom", "root", "root", 0666, NULL, NULL }, + { "mem", "root", "root", 0640, NULL, NULL }, + { "kmem", "root", "root", 0640, NULL, NULL }, + { "console", "root", "tty", 0600, NULL, "@chmod 600 $SMDEV" }, + { "ptmx", "root", "tty", 0666, NULL, NULL }, + { "pty.*", "root", "tty", 0660, NULL, NULL }, + { "tty", "root", "tty", 0666, NULL, NULL }, + { "tty[0-9]*", "root", "tty", 0660, NULL, NULL }, + { "vcsa*[0-9]*","root", "tty", 0660, NULL, NULL }, + { "sd[a-z].*", "root", "disk", 0660, NULL, NULL }, + { "sr[0-9]*", "root", "cdrom", 0660, NULL, "@ln -sf $SMDEV /dev/cdrom" }, + { ".*", "root", "root", 0660, NULL, NULL }, +}; diff --git a/config.h b/config.h @@ -1,26 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -struct rule { - const char *devregex; - const char *user; - const char *group; - int mode; - const char *path; - const char *cmd; -} rules[] = { - { "null", "root", "root", 0666, NULL, "@chmod 666 $SMDEV" }, - { "zero", "root", "root", 0666, NULL, NULL }, - { "full", "root", "root", 0666, NULL, NULL }, - { "random", "root", "root", 0666, NULL, NULL }, - { "urandom", "root", "root", 0666, NULL, NULL }, - { "mem", "root", "root", 0640, NULL, NULL }, - { "kmem", "root", "root", 0640, NULL, NULL }, - { "console", "root", "tty", 0600, NULL, "@chmod 600 $SMDEV" }, - { "ptmx", "root", "tty", 0666, NULL, NULL }, - { "pty.*", "root", "tty", 0660, NULL, NULL }, - { "tty", "root", "tty", 0666, NULL, NULL }, - { "tty[0-9]*", "root", "tty", 0660, NULL, NULL }, - { "vcsa*[0-9]*","root", "tty", 0660, NULL, NULL }, - { "sd[a-z].*", "root", "disk", 0660, NULL, NULL }, - { "sr[0-9]*", "root", "cdrom", 0660, NULL, "@ln -sf $SMDEV /dev/cdrom" }, - { ".*", "root", "root", 0660, NULL, NULL }, -};