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
nexedi
linux
Commits
7b106d88
Commit
7b106d88
authored
Dec 29, 2002
by
Christoph Hellwig
Committed by
Linus Torvalds
Dec 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] nommu systems can't support /proc/<pid>/maps
So stub it out, similar to /proc/<pid>/wchan for !CONFIG_KALLSYMS
parent
007d8ed8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
fs/proc/array.c
fs/proc/array.c
+4
-2
fs/proc/base.c
fs/proc/base.c
+8
-2
No files found.
fs/proc/array.c
View file @
7b106d88
...
...
@@ -513,8 +513,9 @@ static int proc_pid_maps_get_line (char *buf, struct vm_area_struct *map)
return
len
;
}
ssize_t
proc_pid_read_maps
(
struct
task_struct
*
task
,
struct
file
*
file
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
#ifdef CONFIG_MMU
ssize_t
proc_pid_read_maps
(
struct
task_struct
*
task
,
struct
file
*
file
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
struct
mm_struct
*
mm
;
struct
vm_area_struct
*
map
;
...
...
@@ -597,3 +598,4 @@ ssize_t proc_pid_read_maps (struct task_struct *task, struct file * file, char *
out:
return
retval
;
}
#endif
/* CONFIG_MMU */
fs/proc/base.c
View file @
7b106d88
...
...
@@ -75,7 +75,9 @@ static struct pid_entry base_stuff[] = {
E
(
PROC_PID_CMDLINE
,
"cmdline"
,
S_IFREG
|
S_IRUGO
),
E
(
PROC_PID_STAT
,
"stat"
,
S_IFREG
|
S_IRUGO
),
E
(
PROC_PID_STATM
,
"statm"
,
S_IFREG
|
S_IRUGO
),
#ifdef CONFIG_MMU
E
(
PROC_PID_MAPS
,
"maps"
,
S_IFREG
|
S_IRUGO
),
#endif
E
(
PROC_PID_MEM
,
"mem"
,
S_IFREG
|
S_IRUSR
|
S_IWUSR
),
E
(
PROC_PID_CWD
,
"cwd"
,
S_IFLNK
|
S_IRWXUGO
),
E
(
PROC_PID_ROOT
,
"root"
,
S_IFLNK
|
S_IRWXUGO
),
...
...
@@ -98,7 +100,6 @@ static inline int proc_type(struct inode *inode)
return
PROC_I
(
inode
)
->
type
;
}
ssize_t
proc_pid_read_maps
(
struct
task_struct
*
,
struct
file
*
,
char
*
,
size_t
,
loff_t
*
);
int
proc_pid_stat
(
struct
task_struct
*
,
char
*
);
int
proc_pid_status
(
struct
task_struct
*
,
char
*
);
int
proc_pid_statm
(
struct
task_struct
*
,
char
*
);
...
...
@@ -321,6 +322,9 @@ static int proc_permission(struct inode *inode, int mask)
return
proc_check_root
(
inode
);
}
#ifdef CONFIG_MMU
extern
ssize_t
proc_pid_read_maps
(
struct
task_struct
*
,
struct
file
*
,
char
*
,
size_t
,
loff_t
*
);
static
ssize_t
pid_maps_read
(
struct
file
*
file
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
...
...
@@ -335,6 +339,7 @@ static ssize_t pid_maps_read(struct file * file, char * buf,
static
struct
file_operations
proc_maps_operations
=
{
.
read
=
pid_maps_read
,
};
#endif
/* CONFIG_MMU */
extern
struct
seq_operations
mounts_op
;
static
int
mounts_open
(
struct
inode
*
inode
,
struct
file
*
file
)
...
...
@@ -1023,10 +1028,11 @@ static struct dentry *proc_base_lookup(struct inode *dir, struct dentry *dentry)
inode
->
i_fop
=
&
proc_info_file_operations
;
ei
->
op
.
proc_read
=
proc_pid_statm
;
break
;
#ifdef CONFIG_MMU
case
PROC_PID_MAPS
:
inode
->
i_fop
=
&
proc_maps_operations
;
break
;
#endif
case
PROC_PID_MEM
:
inode
->
i_op
=
&
proc_mem_inode_operations
;
inode
->
i_fop
=
&
proc_mem_operations
;
...
...
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