Commit d3b63428 authored by Pavel Emelyanov's avatar Pavel Emelyanov

proc: Use fopen_proc instead of fopen("/proc...")

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6e960f1f
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment