mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
protobuf: remove leading underscores from protobuf structs
Fixes: #1560 The latest protobuf-c compiler breaks CRIU because they removed leading underscores from structs in 1.4.0. This replaces those definitions with the standard generated structs. v2: remove struct _VmaEntry, struct _CredsEntry and struct _CoreEntry Signed-off-by: Zeyad Yasser <zeyady98@gmail.com>
This commit is contained in:
committed by
Andrei Vagin
parent
efb9fccd41
commit
694eafa1f6
@@ -1,13 +1,15 @@
|
||||
#ifndef __CR_IRMAP__H__
|
||||
#define __CR_IRMAP__H__
|
||||
|
||||
#include "images/fh.pb-c.h"
|
||||
|
||||
char *irmap_lookup(unsigned int s_dev, unsigned long i_ino);
|
||||
struct _FhEntry;
|
||||
int irmap_queue_cache(unsigned int dev, unsigned long ino,
|
||||
struct _FhEntry *fh);
|
||||
FhEntry *fh);
|
||||
int irmap_predump_prep(void);
|
||||
int irmap_predump_run(void);
|
||||
int check_open_handle(unsigned int s_dev, unsigned long i_ino,
|
||||
struct _FhEntry *f_handle);
|
||||
FhEntry *f_handle);
|
||||
int irmap_load_cache(void);
|
||||
int irmap_scan_path_add(char *path);
|
||||
#endif
|
||||
|
@@ -11,8 +11,6 @@ struct parasite_dump_misc;
|
||||
struct parasite_drain_fd;
|
||||
struct vm_area_list;
|
||||
struct pstree_item;
|
||||
struct _CredsEntry;
|
||||
struct _CoreEntry;
|
||||
struct list_head;
|
||||
struct cr_imgset;
|
||||
struct fd_opts;
|
||||
@@ -31,11 +29,11 @@ extern int parasite_dump_posix_timers_seized(struct proc_posix_timers_stat *proc
|
||||
struct parasite_ctl *ctl, struct pstree_item *);
|
||||
|
||||
extern int parasite_dump_misc_seized(struct parasite_ctl *ctl, struct parasite_dump_misc *misc);
|
||||
extern int parasite_dump_creds(struct parasite_ctl *ctl, struct _CredsEntry *ce);
|
||||
extern int parasite_dump_thread_leader_seized(struct parasite_ctl *ctl, int pid, struct _CoreEntry *core);
|
||||
extern int parasite_dump_creds(struct parasite_ctl *ctl, CredsEntry *ce);
|
||||
extern int parasite_dump_thread_leader_seized(struct parasite_ctl *ctl, int pid, CoreEntry *core);
|
||||
extern int parasite_dump_thread_seized(struct parasite_thread_ctl *tctl,
|
||||
struct parasite_ctl *ctl, int id,
|
||||
struct pid *tid, struct _CoreEntry *core);
|
||||
struct pid *tid, CoreEntry *core);
|
||||
extern int dump_thread_core(int pid, CoreEntry *core,
|
||||
const struct parasite_dump_thread *dt);
|
||||
|
||||
|
@@ -113,7 +113,7 @@ extern int prepare_task_entries(void);
|
||||
extern int prepare_dummy_task_state(struct pstree_item *pi);
|
||||
|
||||
extern int get_task_ids(struct pstree_item *);
|
||||
extern struct _TaskKobjIdsEntry *root_ids;
|
||||
extern TaskKobjIdsEntry *root_ids;
|
||||
|
||||
extern void core_entry_free(CoreEntry *core);
|
||||
extern CoreEntry *core_entry_alloc(int alloc_thread_info, int alloc_tc);
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include "common/list.h"
|
||||
#include "vma.h"
|
||||
#include "kerndat.h"
|
||||
#include "images/mm.pb-c.h"
|
||||
|
||||
struct task_entries {
|
||||
int nr_threads, nr_tasks, nr_helpers;
|
||||
@@ -25,8 +26,6 @@ struct fdt {
|
||||
futex_t fdt_lock;
|
||||
};
|
||||
|
||||
struct _MmEntry;
|
||||
|
||||
struct rst_info {
|
||||
struct list_head fds;
|
||||
|
||||
@@ -40,7 +39,7 @@ struct rst_info {
|
||||
struct fdt *fdt;
|
||||
|
||||
struct vm_area_list vmas;
|
||||
struct _MmEntry *mm;
|
||||
MmEntry *mm;
|
||||
struct list_head vma_io;
|
||||
unsigned int pages_img_id;
|
||||
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include "common/lock.h"
|
||||
#include "images/vma.pb-c.h"
|
||||
|
||||
struct _VmaEntry;
|
||||
struct vma_area;
|
||||
|
||||
extern int collect_shmem(int pid, struct vma_area *vma);
|
||||
|
@@ -1230,7 +1230,7 @@ err_addr:
|
||||
|
||||
static int maybe_disable_thp(struct pstree_item *t, struct page_read *pr)
|
||||
{
|
||||
struct _MmEntry *mm = rsti(t)->mm;
|
||||
MmEntry *mm = rsti(t)->mm;
|
||||
|
||||
/*
|
||||
* There is no need to disable it if the page read doesn't
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "version.h"
|
||||
#include "rpc.pb-c.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
extern "C" {
|
||||
@@ -112,7 +113,7 @@ void criu_set_pidfd_store_sk(int sk);
|
||||
* some non-existing one is reported.
|
||||
*/
|
||||
|
||||
typedef struct _CriuNotify *criu_notify_arg_t;
|
||||
typedef CriuNotify *criu_notify_arg_t;
|
||||
void criu_set_notify_cb(int (*cb)(char *action, criu_notify_arg_t na));
|
||||
|
||||
/* Get pid of root task. 0 if not available */
|
||||
|
Reference in New Issue
Block a user