Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
d3b63428
Commit
d3b63428
authored
Sep 17, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proc: Use fopen_proc instead of fopen("/proc...")
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
6e960f1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
vdso.c
arch/aarch64/vdso.c
+1
-1
vdso.c
arch/x86/vdso.c
+1
-1
proc_parse.c
proc_parse.c
+3
-3
No files found.
arch/aarch64/vdso.c
View file @
d3b63428
...
...
@@ -214,7 +214,7 @@ static int vdso_fill_self_symtable(struct vdso_symtable *s)
*
s
=
(
struct
vdso_symtable
)
VDSO_SYMTABLE_INIT
;
maps
=
fopen
(
"/proc/self/maps"
,
"r
"
);
maps
=
fopen
_proc
(
PROC_SELF
,
"maps
"
);
if
(
!
maps
)
{
pr_perror
(
"Can't open self-vma"
);
return
-
1
;
...
...
arch/x86/vdso.c
View file @
d3b63428
...
...
@@ -208,7 +208,7 @@ static int vdso_fill_self_symtable(struct vdso_symtable *s)
*
s
=
(
struct
vdso_symtable
)
VDSO_SYMTABLE_INIT
;
maps
=
fopen
(
"/proc/self/maps"
,
"r
"
);
maps
=
fopen
_proc
(
PROC_SELF
,
"maps
"
);
if
(
!
maps
)
{
pr_perror
(
"Can't open self-vma"
);
return
-
1
;
...
...
proc_parse.c
View file @
d3b63428
...
...
@@ -47,7 +47,7 @@ int parse_cpuinfo_features(int (*handler)(char *tok))
{
FILE
*
cpuinfo
;
cpuinfo
=
fopen
(
"/proc/cpuinfo"
,
"r
"
);
cpuinfo
=
fopen
_proc
(
PROC_GEN
,
"cpuinfo
"
);
if
(
!
cpuinfo
)
{
pr_perror
(
"Can't open cpuinfo file"
);
return
-
1
;
...
...
@@ -1477,7 +1477,7 @@ int parse_file_locks(void)
int
ret
=
0
;
bool
is_blocked
;
fl_locks
=
fopen
(
"/proc/locks"
,
"r
"
);
fl_locks
=
fopen
_proc
(
PROC_GEN
,
"locks
"
);
if
(
!
fl_locks
)
{
pr_perror
(
"Can't open file locks file!"
);
return
-
1
;
...
...
@@ -1763,7 +1763,7 @@ int parse_cgroups(struct list_head *cgroups, unsigned int *n_cgroups)
int
heirarchy
,
ret
=
0
;
struct
cg_controller
*
cur
=
NULL
;
f
=
fopen
(
"/proc/cgroups"
,
"r
"
);
f
=
fopen
_proc
(
PROC_GEN
,
"cgroups
"
);
if
(
!
f
)
{
pr_perror
(
"failed opening /proc/cgroups"
);
return
-
1
;
...
...
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