Commit 049f8345 authored by Pavel Emelyanov's avatar Pavel Emelyanov

headers: Remove some dead code

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 69b8cac2
......@@ -24,20 +24,6 @@
#include <time.h>
#include "images/mm.pb-c.h"
#include "images/vma.pb-c.h"
#include "images/creds.pb-c.h"
#include "images/core.pb-c.h"
struct task_restore_core_args;
struct thread_restore_args;
typedef long (*task_restore_fcall_t) (struct task_restore_core_args *args);
typedef long (*thread_restore_fcall_t) (struct thread_restore_args *args);
#define RESTORE_CMD__NONE 0
#define RESTORE_CMD__GET_SELF_LEN 1
#define RESTORE_CMD__RESTORE_CORE 2
#define RESTORE_CMD__RESTORE_THREAD 3
/*
* These *must* be power of two values.
......@@ -64,8 +50,6 @@ struct restore_posix_timer {
int overrun;
};
struct task_restore_core_args;
/*
* We should be able to construct fpu sigframe in sigreturn_prep_fpu_frame,
* so the mem_zone.rt_sigframe should be 64-bytes aligned. To make things
......@@ -117,6 +101,8 @@ struct thread_restore_args {
struct thread_creds_args *creds_args;
} __aligned(64);
typedef long (*thread_restore_fcall_t) (struct thread_restore_args *args);
struct task_restore_args {
struct thread_restore_args *t; /* thread group leader */
......
......@@ -129,9 +129,6 @@ extern int do_open_proc(pid_t pid, int flags, const char *fmt, ...);
__f; \
})
#define pr_img_head(type, ...) pr_msg("\n"#type __VA_ARGS__ "\n----------------\n")
#define pr_img_tail(type) pr_msg("----------------\n")
#define DEVZERO (makedev(1, 5))
#define KDEV_MINORBITS 20
......@@ -264,7 +261,6 @@ FILE *fopenat(int dirfd, char *path, char *cflags);
void split(char *str, char token, char ***out, int *n);
int fd_has_data(int lfd);
size_t read_into_buffer(int fd, char *buff, size_t size);
int make_yard(char *path);
......
......@@ -931,21 +931,6 @@ int fd_has_data(int lfd)
return ret;
}
size_t read_into_buffer(int fd, char *buff, size_t size)
{
size_t n = 0;
size_t curr = 0;
while (1) {
n = read(fd, buff + curr, size - curr);
if (n < 1)
return n;
curr += n;
if (curr == size)
return size;
}
}
int make_yard(char *path)
{
if (mount("none", path, "tmpfs", 0, NULL)) {
......
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