lkml.org 
[lkml]   [2007]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: class_device_create() and the mode of the device file in /dev.
On 5/23/07, Y Khan <ykhanportland@yahoo.com> wrote:
> I am porting a driver from 2.4 to 2.6. I have replaced
> the call devfs_register() with class_create() and
> class_device_create(). Now, udev is automatically
> creating the device file in /dev.

Please use device_create(), class_device_* will go away in the future.

> The device file being created has a default mode of
> 0600. Is it possible to override this default mode
> from inside the kernel. I do not want to do anything
> in the configuration file for udev.
>
> I could modify the attribute of the class and the
> class device but I do not think that they will change
> the default permissions for the /dev device file.
>
> devfs_register() used to take a mode argument.

No, the kernel is not involved in specifying /dev permissions. You
have to add a udev rule to assign a mode that isn't the default.

Thanks,
Kay
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-23 05:49    [W:0.055 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site