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
ae61518f
Commit
ae61518f
authored
Aug 07, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "nonseekable_open()" helper functions for nonseekable
file descriptors.
parent
915a29ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
fs/open.c
fs/open.c
+12
-0
include/linux/fs.h
include/linux/fs.h
+1
-0
No files found.
fs/open.c
View file @
ae61518f
...
...
@@ -1070,3 +1070,15 @@ int generic_file_open(struct inode * inode, struct file * filp)
}
EXPORT_SYMBOL
(
generic_file_open
);
/*
* This is used by subsystems that don't want seekable
* file descriptors
*/
int
nonseekable_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
filp
->
f_mode
&=
~
(
FMODE_LSEEK
|
FMODE_PREAD
|
FMODE_PWRITE
);
return
0
;
}
EXPORT_SYMBOL
(
nonseekable_open
);
include/linux/fs.h
View file @
ae61518f
...
...
@@ -1435,6 +1435,7 @@ extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
extern
loff_t
generic_file_llseek
(
struct
file
*
file
,
loff_t
offset
,
int
origin
);
extern
loff_t
remote_llseek
(
struct
file
*
file
,
loff_t
offset
,
int
origin
);
extern
int
generic_file_open
(
struct
inode
*
inode
,
struct
file
*
filp
);
extern
int
nonseekable_open
(
struct
inode
*
inode
,
struct
file
*
filp
);
static
inline
void
do_generic_file_read
(
struct
file
*
filp
,
loff_t
*
ppos
,
read_descriptor_t
*
desc
,
...
...
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