Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
1ebd32fc
Commit
1ebd32fc
authored
Apr 26, 2006
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] splice: add ->splice_write support for /dev/null
Useful for testing. Signed-off-by:
Jens Axboe
<
axboe@suse.de
>
parent
00522fb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
drivers/char/mem.c
drivers/char/mem.c
+14
-0
No files found.
drivers/char/mem.c
View file @
1ebd32fc
...
...
@@ -27,6 +27,7 @@
#include <linux/crash_dump.h>
#include <linux/backing-dev.h>
#include <linux/bootmem.h>
#include <linux/pipe_fs_i.h>
#include <asm/uaccess.h>
#include <asm/io.h>
...
...
@@ -578,6 +579,18 @@ static ssize_t write_null(struct file * file, const char __user * buf,
return
count
;
}
static
int
pipe_to_null
(
struct
pipe_inode_info
*
info
,
struct
pipe_buffer
*
buf
,
struct
splice_desc
*
sd
)
{
return
sd
->
len
;
}
static
ssize_t
splice_write_null
(
struct
pipe_inode_info
*
pipe
,
struct
file
*
out
,
loff_t
*
ppos
,
size_t
len
,
unsigned
int
flags
)
{
return
splice_from_pipe
(
pipe
,
out
,
ppos
,
len
,
flags
,
pipe_to_null
);
}
#ifdef CONFIG_MMU
/*
* For fun, we are using the MMU for this.
...
...
@@ -785,6 +798,7 @@ static struct file_operations null_fops = {
.
llseek
=
null_lseek
,
.
read
=
read_null
,
.
write
=
write_null
,
.
splice_write
=
splice_write_null
,
};
#if defined(CONFIG_ISA) || !defined(__mc68000__)
...
...
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