Commit e0cb53a1 authored by Pavel Emelyanov's avatar Pavel Emelyanov

mount: Rename struct proc_mountinfo into mount_info

This structure will be used on restore and will be created
from the image, thus the name proc_ is not suitable.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b5803455
......@@ -85,7 +85,7 @@ struct proc_status_creds {
unsigned int cap_bnd[PROC_CAP_SIZE];
};
struct proc_mountinfo {
struct mount_info {
int mnt_id;
int parent_mnt_id;
unsigned int s_dev;
......@@ -97,10 +97,10 @@ struct proc_mountinfo {
char *fstype;
char *source;
char *options;
struct proc_mountinfo *next;
struct mount_info *next;
};
extern struct proc_mountinfo *parse_mountinfo(pid_t pid);
extern struct mount_info *parse_mountinfo(pid_t pid);
extern int parse_pid_stat(pid_t pid, struct proc_pid_stat *s);
extern int parse_pid_stat_small(pid_t pid, struct proc_pid_stat_small *s);
extern int parse_smaps(pid_t pid, struct list_head *vma_area_list, bool use_map_files);
......
......@@ -14,11 +14,11 @@
#include "mount.h"
#include "proc_parse.h"
static struct proc_mountinfo *mntinfo;
static struct mount_info *mntinfo;
int open_mount(unsigned int s_dev)
{
struct proc_mountinfo *i;
struct mount_info *i;
for (i = mntinfo; i != NULL; i = i->next)
if (s_dev == i->s_dev)
......
......@@ -549,7 +549,7 @@ static int parse_sb_opt(char *opt, unsigned *flags, char *uopt)
return do_opt2flag(opt, flags, sb_opt2flag, uopt);
}
static int parse_mnt_opt(char *str, struct proc_mountinfo *mi, int *off)
static int parse_mnt_opt(char *str, struct mount_info *mi, int *off)
{
char *istr = str, *end;
......@@ -585,7 +585,7 @@ static int parse_mnt_opt(char *str, struct proc_mountinfo *mi, int *off)
return 0;
}
static int parse_mountinfo_ent(char *str, struct proc_mountinfo *new)
static int parse_mountinfo_ent(char *str, struct mount_info *new)
{
unsigned int kmaj, kmin;
int ret, n;
......@@ -626,9 +626,9 @@ static int parse_mountinfo_ent(char *str, struct proc_mountinfo *new)
return 0;
}
struct proc_mountinfo *parse_mountinfo(pid_t pid)
struct mount_info *parse_mountinfo(pid_t pid)
{
struct proc_mountinfo *list = NULL;
struct mount_info *list = NULL;
FILE *f;
char str[256];
......@@ -640,7 +640,7 @@ struct proc_mountinfo *parse_mountinfo(pid_t pid)
}
while (fgets(str, sizeof(str), f)) {
struct proc_mountinfo *new;
struct mount_info *new;
int ret;
new = xmalloc(sizeof(*new));
......@@ -667,7 +667,7 @@ out:
err:
while (list) {
struct proc_mountinfo *next = list->next;
struct mount_info *next = list->next;
xfree(list);
list = next;
}
......
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