mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 00:35:23 +00:00
util: Move various helpers there
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
@@ -152,6 +154,10 @@ int reopen_fd_as(int new_fd, int old_fd);
|
||||
int parse_maps(pid_t pid, struct list_head *vma_list);
|
||||
int close_safe(int *fd);
|
||||
|
||||
DIR *opendir_proc(char *fmt, ...);
|
||||
FILE *fopen_proc(char *fmt, char *mode, ...);
|
||||
int open_fmt(char *fmt, int pid, int mode);
|
||||
|
||||
#define __xalloc(op, size, ...) \
|
||||
({ \
|
||||
void *___p = op( __VA_ARGS__ ); \
|
||||
|
Reference in New Issue
Block a user