Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
faef2b6c
Commit
faef2b6c
authored
Jul 24, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sysfs: propagate umode_t
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5b91aca0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
Documentation/filesystems/sysfs.txt
Documentation/filesystems/sysfs.txt
+1
-1
fs/sysfs/file.c
fs/sysfs/file.c
+1
-1
fs/sysfs/inode.c
fs/sysfs/inode.c
+1
-1
fs/sysfs/sysfs.h
fs/sysfs/sysfs.h
+2
-2
No files found.
Documentation/filesystems/sysfs.txt
View file @
faef2b6c
...
@@ -70,7 +70,7 @@ An attribute definition is simply:
...
@@ -70,7 +70,7 @@ An attribute definition is simply:
struct attribute {
struct attribute {
char * name;
char * name;
struct module *owner;
struct module *owner;
mode_t
mode;
umode_t
mode;
};
};
...
...
fs/sysfs/file.c
View file @
faef2b6c
...
@@ -518,7 +518,7 @@ int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr,
...
@@ -518,7 +518,7 @@ int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr,
}
}
int
sysfs_add_file_mode
(
struct
sysfs_dirent
*
dir_sd
,
int
sysfs_add_file_mode
(
struct
sysfs_dirent
*
dir_sd
,
const
struct
attribute
*
attr
,
int
type
,
mode_t
amode
)
const
struct
attribute
*
attr
,
int
type
,
u
mode_t
amode
)
{
{
umode_t
mode
=
(
amode
&
S_IALLUGO
)
|
S_IFREG
;
umode_t
mode
=
(
amode
&
S_IALLUGO
)
|
S_IFREG
;
struct
sysfs_addrm_cxt
acxt
;
struct
sysfs_addrm_cxt
acxt
;
...
...
fs/sysfs/inode.c
View file @
faef2b6c
...
@@ -187,7 +187,7 @@ int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value,
...
@@ -187,7 +187,7 @@ int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value,
return
error
;
return
error
;
}
}
static
inline
void
set_default_inode_attr
(
struct
inode
*
inode
,
mode_t
mode
)
static
inline
void
set_default_inode_attr
(
struct
inode
*
inode
,
u
mode_t
mode
)
{
{
inode
->
i_mode
=
mode
;
inode
->
i_mode
=
mode
;
inode
->
i_atime
=
inode
->
i_mtime
=
inode
->
i_ctime
=
CURRENT_TIME
;
inode
->
i_atime
=
inode
->
i_mtime
=
inode
->
i_ctime
=
CURRENT_TIME
;
...
...
fs/sysfs/sysfs.h
View file @
faef2b6c
...
@@ -79,7 +79,7 @@ struct sysfs_dirent {
...
@@ -79,7 +79,7 @@ struct sysfs_dirent {
};
};
unsigned
int
s_flags
;
unsigned
int
s_flags
;
u
nsigned
short
s_mode
;
u
mode_t
s_mode
;
ino_t
s_ino
;
ino_t
s_ino
;
struct
sysfs_inode_attrs
*
s_iattr
;
struct
sysfs_inode_attrs
*
s_iattr
;
};
};
...
@@ -229,7 +229,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd,
...
@@ -229,7 +229,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd,
const
struct
attribute
*
attr
,
int
type
);
const
struct
attribute
*
attr
,
int
type
);
int
sysfs_add_file_mode
(
struct
sysfs_dirent
*
dir_sd
,
int
sysfs_add_file_mode
(
struct
sysfs_dirent
*
dir_sd
,
const
struct
attribute
*
attr
,
int
type
,
mode_t
amode
);
const
struct
attribute
*
attr
,
int
type
,
u
mode_t
amode
);
/*
/*
* bin.c
* bin.c
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment