Commit 79da5384 authored by Pavel Emelyanov's avatar Pavel Emelyanov

mount: Rename proc_mountinfo mnt_root to mountpoint

What is stored there is the path to mountpoint. The root
is the field previously named "parent root".
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent db297a0f
......@@ -89,7 +89,7 @@ struct proc_mountinfo {
int mnt_id;
int parent_mnt_id;
unsigned int s_dev;
char mnt_root[64];
char mountpoint[64];
};
extern int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems);
......
......@@ -26,7 +26,7 @@ again:
for (i = last; i < nr_mntinfo; i++) {
if (s_dev == mntinfo[i].s_dev) {
last = i;
return open(mntinfo[i].mnt_root, O_RDONLY);
return open(mntinfo[i].mountpoint, O_RDONLY);
}
}
......
......@@ -485,7 +485,7 @@ int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems)
while (fgets(str, sizeof(str), f)) {
unsigned int kmaj, kmin, parent_mnt_id;
char parent_mnt_root[63];
char mnt_root[63];
int ret;
if ((i + 1) >= nr_elems) {
......@@ -495,8 +495,8 @@ int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems)
ret = sscanf(str, "%i %i %u:%u %63s %63s",
&mi[i].mnt_id, &parent_mnt_id,
&kmaj, &kmin, parent_mnt_root,
mi[i].mnt_root);
&kmaj, &kmin, mnt_root,
mi[i].mountpoint);
if (ret != 6) {
pr_err("Bad format in %d mountinfo\n", pid);
i = -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