Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Add a group 'gpio' and create gpio(4) device nodes under...



details:   https://anonhg.NetBSD.org/src/rev/e3f8b55abbd0
branches:  trunk
changeset: 786896:e3f8b55abbd0
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sun May 19 16:09:04 2013 +0000

description:
Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'.  This allows controlled access
to specifically enabled gpio pins to members of the gpio group.  See
gpioctl(8), and, gpio(4) for details.

diffstat:

 etc/MAKEDEV.tmpl |  5 +++--
 etc/group        |  1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r a43a76de9884 -r e3f8b55abbd0 etc/MAKEDEV.tmpl
--- a/etc/MAKEDEV.tmpl  Sun May 19 15:51:10 2013 +0000
+++ b/etc/MAKEDEV.tmpl  Sun May 19 16:09:04 2013 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#      $NetBSD: MAKEDEV.tmpl,v 1.168 2013/05/01 13:12:00 kiyohara Exp $
+#      $NetBSD: MAKEDEV.tmpl,v 1.169 2013/05/19 16:09:04 mbalmer Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -496,6 +496,7 @@
 
        u_root="%uid_root%"
        u_uucp="%uid_uucp%"
+       g_gpio="%gid_gpio%"
        g_kmem="%gid_kmem%"
        g_ntpd="%gid_ntpd%"
        g_operator="%gid_operator%"
@@ -1458,7 +1459,7 @@
 
 gpio[0-9]*)
        unit=${i#gpio}
-       mkdev gpio$unit c %gpio_chr% $unit 644
+       mkdev gpio$unit c %gpio_chr% $unit 664 $g_gpio
        ;;
 
 rmidi[0-9]*)
diff -r a43a76de9884 -r e3f8b55abbd0 etc/group
--- a/etc/group Sun May 19 15:51:10 2013 +0000
+++ b/etc/group Sun May 19 16:09:04 2013 +0000
@@ -30,4 +30,5 @@
 authpf:*:72:
 users:*:100:
 dialer:*:117:
+gpio:*:118:
 nogroup:*:32766:



Home | Main Index | Thread Index | Old Index