chmod existing nodes - smdev - suckless mdev
 (HTM) git clone git://git.suckless.org/smdev
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 6bc6f96acdf7319ff6a71007d025762a42700a34
 (DIR) parent 8296616c9491377f54b82f3fb4ddf4b34b387c4e
 (HTM) Author: fbt <fbt@fleshless.org>
       Date:   Fri,  1 Aug 2014 08:28:12 +0400
       
       chmod existing nodes
       
       Diffstat:
         M smdev.c                             |       3 +++
       
       1 file changed, 3 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/smdev.c b/smdev.c
       @@ -309,6 +309,9 @@ createdev(struct event *ev)
                if (chown(rpath.path, pw->pw_uid, gr->gr_gid) < 0)
                        eprintf("chown %s:", rpath.path);
        
       +        if (chmod(rpath.path, rule->mode) < 0)
       +                eprintf("chmod %s:", rpath.path);
       +
                if (rule->path && rule->path[0] == '>') {
                        /* ev->devname is the original device name */
                        snprintf(buf, sizeof(buf), "/dev/%s", ev->devname);