mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 00:35:23 +00:00
mount: move functions about mounts from proc_parse.h
It remove a dependece between proc_parse.h and mount.c. v2: type fix in the subject Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
f2d55d9483
commit
d0d117986e
@@ -128,4 +128,29 @@ extern int mntns_maybe_create_roots(void);
|
||||
extern int read_mnt_ns_img(void);
|
||||
extern void cleanup_mnt_ns(void);
|
||||
|
||||
struct mount_info;
|
||||
typedef int (*mount_fn_t)(struct mount_info *mi, const char *src, const
|
||||
char *fstype, unsigned long mountflags);
|
||||
|
||||
struct fstype {
|
||||
char *name;
|
||||
int code;
|
||||
int (*dump)(struct mount_info *pm);
|
||||
int (*restore)(struct mount_info *pm);
|
||||
int (*parse)(struct mount_info *pm);
|
||||
mount_fn_t mount;
|
||||
};
|
||||
|
||||
extern bool add_skip_mount(const char *mountpoint);
|
||||
struct ns_id;
|
||||
extern struct mount_info *parse_mountinfo(pid_t pid, struct ns_id *nsid, bool for_dump);
|
||||
|
||||
/* callback for AUFS support */
|
||||
extern int aufs_parse(struct mount_info *mi);
|
||||
|
||||
/* callback for OverlayFS support */
|
||||
extern int overlayfs_parse(struct mount_info *mi);
|
||||
|
||||
extern int check_mnt_id(void);
|
||||
|
||||
#endif /* __CR_MOUNT_H__ */
|
||||
|
@@ -103,26 +103,8 @@ struct proc_status_creds {
|
||||
bool proc_status_creds_dumpable(struct proc_status_creds *parent,
|
||||
struct proc_status_creds *child);
|
||||
|
||||
struct mount_info;
|
||||
typedef int (*mount_fn_t)(struct mount_info *mi, const char *src, const
|
||||
char *fstype, unsigned long mountflags);
|
||||
|
||||
struct fstype {
|
||||
char *name;
|
||||
int code;
|
||||
int (*dump)(struct mount_info *pm);
|
||||
int (*restore)(struct mount_info *pm);
|
||||
int (*parse)(struct mount_info *pm);
|
||||
mount_fn_t mount;
|
||||
};
|
||||
|
||||
struct vm_area_list;
|
||||
|
||||
#define INVALID_UID ((uid_t)-1)
|
||||
|
||||
extern bool add_skip_mount(const char *mountpoint);
|
||||
struct ns_id;
|
||||
extern struct mount_info *parse_mountinfo(pid_t pid, struct ns_id *nsid, bool for_dump);
|
||||
extern int parse_pid_stat(pid_t pid, struct proc_pid_stat *s);
|
||||
extern unsigned int parse_pid_loginuid(pid_t pid, int *err, bool ignore_noent);
|
||||
extern int parse_pid_oom_score_adj(pid_t pid, int *err);
|
||||
@@ -180,8 +162,6 @@ extern int get_fd_mntid(int fd, int *mnt_id);
|
||||
struct pid;
|
||||
extern int parse_threads(int pid, struct pid **_t, int *_n);
|
||||
|
||||
extern int check_mnt_id(void);
|
||||
|
||||
/*
|
||||
* This struct describes a group controlled by one controller.
|
||||
* The @name is the controller name or 'name=...' for named cgroups.
|
||||
@@ -205,12 +185,6 @@ extern void put_ctls(struct list_head *);
|
||||
|
||||
int collect_controllers(struct list_head *cgroups, unsigned int *n_cgroups);
|
||||
|
||||
/* callback for AUFS support */
|
||||
extern int aufs_parse(struct mount_info *mi);
|
||||
|
||||
/* callback for OverlayFS support */
|
||||
extern int overlayfs_parse(struct mount_info *mi);
|
||||
|
||||
int parse_children(pid_t pid, pid_t **_c, int *_n);
|
||||
|
||||
#endif /* __CR_PROC_PARSE_H__ */
|
||||
|
@@ -6,6 +6,9 @@
|
||||
#define SBINFO_PATH_LEN (sizeof SYSFS_AUFS + SBINFO_LEN) /* /sys/fs/aufs/<sbinfo> */
|
||||
#define AUFSBR_PATH_LEN (SBINFO_PATH_LEN + 6 + 1) /* /sys/fs/aufs/<sbinfo>/br%3d */
|
||||
|
||||
struct mount_info;
|
||||
struct vma_area;
|
||||
|
||||
extern int parse_aufs_branches(struct mount_info *mi);
|
||||
extern int fixup_aufs_vma_fd(struct vma_area *vma, int vm_file_fd);
|
||||
extern void free_aufs_branches(void);
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include "plugin.h"
|
||||
#include "mount.h"
|
||||
#include "pstree.h"
|
||||
#include "proc_parse.h"
|
||||
#include "image.h"
|
||||
#include "namespaces.h"
|
||||
#include "protobuf.h"
|
||||
|
Reference in New Issue
Block a user