chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
356816a
)
[PATCH] add support for the default_mode variable, as it is documented...
author
greg@kroah.com
<greg@kroah.com>
Thu, 4 Dec 2003 01:41:02 +0000
(17:41 -0800)
committer
Greg KH
<gregkh@suse.de>
Wed, 27 Apr 2005 04:13:05 +0000
(21:13 -0700)
namedev.c
patch
|
blob
|
history
diff --git
a/namedev.c
b/namedev.c
index b9e099413bc3bec815d860f11b730ddb6227adf2..f4c263f5bc25fcacf9ef7066c77ae2966e77696f 100644
(file)
--- a/
namedev.c
+++ b/
namedev.c
@@
-138,8
+138,12
@@
int add_config_dev(struct config_device *new_dev)
static mode_t get_default_mode(struct sysfs_class_device *class_dev)
{
static mode_t get_default_mode(struct sysfs_class_device *class_dev)
{
- /* just default everyone to rw for the world! */
- return 0666;
+ mode_t mode = 0600; /* default to owner rw only */
+
+ if (strlen(default_mode_str) != 0) {
+ mode = strtol(default_mode_str, NULL, 8);
+ }
+ return mode;
}
static void build_kernel_number(struct sysfs_class_device *class_dev, struct udevice *udev)
}
static void build_kernel_number(struct sysfs_class_device *class_dev, struct udevice *udev)