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
5aa140c2
Commit
5aa140c2
authored
Oct 06, 2008
by
Alexey Dobriyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proc: move /proc/vmcore creation to fs/proc/vmcore.c
Signed-off-by:
Alexey Dobriyan
<
adobriyan@gmail.com
>
parent
6d80e53f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
8 deletions
+3
-8
fs/proc/proc_misc.c
fs/proc/proc_misc.c
+0
-3
fs/proc/vmcore.c
fs/proc/vmcore.c
+3
-3
include/linux/crash_dump.h
include/linux/crash_dump.h
+0
-2
No files found.
fs/proc/proc_misc.c
View file @
5aa140c2
...
...
@@ -62,7 +62,4 @@ void __init proc_misc_init(void)
proc_symlink
(
"mounts"
,
NULL
,
"self/mounts"
);
/* And now for trickier ones */
#ifdef CONFIG_PROC_VMCORE
proc_vmcore
=
proc_create
(
"vmcore"
,
S_IRUSR
,
NULL
,
&
proc_vmcore_operations
);
#endif
}
fs/proc/vmcore.c
View file @
5aa140c2
...
...
@@ -32,7 +32,7 @@ static size_t elfcorebuf_sz;
/* Total size of vmcore file. */
static
u64
vmcore_size
;
struct
proc_dir_entry
*
proc_vmcore
=
NULL
;
st
atic
st
ruct
proc_dir_entry
*
proc_vmcore
=
NULL
;
/* Reads a page from the oldmem device from given offset. */
static
ssize_t
read_from_oldmem
(
char
*
buf
,
size_t
count
,
...
...
@@ -162,7 +162,7 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
return
acc
;
}
const
struct
file_operations
proc_vmcore_operations
=
{
static
const
struct
file_operations
proc_vmcore_operations
=
{
.
read
=
read_vmcore
,
};
...
...
@@ -652,7 +652,7 @@ static int __init vmcore_init(void)
return
rc
;
}
/* Initialize /proc/vmcore size if proc is already up. */
proc_vmcore
=
proc_create
(
"vmcore"
,
S_IRUSR
,
NULL
,
&
proc_vmcore_operations
);
if
(
proc_vmcore
)
proc_vmcore
->
size
=
vmcore_size
;
return
0
;
...
...
include/linux/crash_dump.h
View file @
5aa140c2
...
...
@@ -14,8 +14,6 @@ extern unsigned long long elfcorehdr_addr;
extern
ssize_t
copy_oldmem_page
(
unsigned
long
,
char
*
,
size_t
,
unsigned
long
,
int
);
extern
const
struct
file_operations
proc_vmcore_operations
;
extern
struct
proc_dir_entry
*
proc_vmcore
;
/* Architecture code defines this if there are other possible ELF
* machine types, e.g. on bi-arch capable hardware. */
...
...
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