Commit fdfef4b4 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

headers: Change "../protobuf/" to "protobuf/"

No need to walk up the directories if we need
to include protobuf file. This was always a bad
use of ability to walk the filesystem from other
headers.

Same time we don't need -I$(SRC_DIR)/protobuf/
in general makefile anymore.

[xemul: Small fixlet in head Makefile, since patch
 it out-of-order]
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ef4783a6
...@@ -59,7 +59,7 @@ ARCH_DIR := $(SRC_DIR)/arch/$(ARCH) ...@@ -59,7 +59,7 @@ ARCH_DIR := $(SRC_DIR)/arch/$(ARCH)
$(if $(wildcard $(ARCH_DIR)),,$(error "The architecture $(ARCH) isn't supported")) $(if $(wildcard $(ARCH_DIR)),,$(error "The architecture $(ARCH) isn't supported"))
CFLAGS += -I$(SRC_DIR)/include -I$(SRC_DIR)/pie -I$(ARCH_DIR) CFLAGS += -I$(SRC_DIR)/include -I$(SRC_DIR)/pie -I$(ARCH_DIR) -I$(SRC_DIR)
CFLAGS += -iquote $(ARCH_DIR)/include -fno-strict-aliasing CFLAGS += -iquote $(ARCH_DIR)/include -fno-strict-aliasing
LIBS := -lrt -lpthread -lprotobuf-c LIBS := -lrt -lpthread -lprotobuf-c
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include "ptrace.h" #include "ptrace.h"
#include "asm/processor-flags.h" #include "asm/processor-flags.h"
#include "protobuf.h" #include "protobuf.h"
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
#include "../protobuf/creds.pb-c.h" #include "protobuf/creds.pb-c.h"
#include "parasite-syscall.h" #include "parasite-syscall.h"
#include "syscall.h" #include "syscall.h"
#include "log.h" #include "log.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define __CR_ASM_RESTORER_H__ #define __CR_ASM_RESTORER_H__
#include "asm/types.h" #include "asm/types.h"
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
/* Copied from the Linux kernel header arch/arm/include/asm/sigcontext.h */ /* Copied from the Linux kernel header arch/arm/include/asm/sigcontext.h */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <signal.h> #include <signal.h>
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
#include "asm/bitops.h" #include "asm/bitops.h"
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include "ptrace.h" #include "ptrace.h"
#include "asm/processor-flags.h" #include "asm/processor-flags.h"
#include "protobuf.h" #include "protobuf.h"
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
#include "../protobuf/creds.pb-c.h" #include "protobuf/creds.pb-c.h"
#include "parasite-syscall.h" #include "parasite-syscall.h"
#include "syscall.h" #include "syscall.h"
#include "log.h" #include "log.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define __CR_ASM_RESTORER_H__ #define __CR_ASM_RESTORER_H__
#include "asm/types.h" #include "asm/types.h"
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
struct pt_regs { struct pt_regs {
unsigned long r15; unsigned long r15;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "asm/bitops.h" #include "asm/bitops.h"
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
/* prctl */ /* prctl */
#define ARCH_SET_GS 0x1001 #define ARCH_SET_GS 0x1001
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "image.h" #include "image.h"
#include "lock.h" #include "lock.h"
#include "../protobuf/vma.pb-c.h" #include "protobuf/vma.pb-c.h"
#define CR_FD_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH) #define CR_FD_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "asm/types.h" #include "asm/types.h"
#include "rbtree.h" #include "rbtree.h"
#include "../protobuf/fdinfo.pb-c.h" #include "protobuf/fdinfo.pb-c.h"
#define FD_PID_INVALID (-2U) #define FD_PID_INVALID (-2U)
#define FD_DESC_INVALID (-3U) #define FD_DESC_INVALID (-3U)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "crtools.h" #include "crtools.h"
#include "protobuf.h" #include "protobuf.h"
#include "../protobuf/file-lock.pb-c.h" #include "protobuf/file-lock.pb-c.h"
#define FL_POSIX 1 #define FL_POSIX 1
#define FL_FLOCK 2 #define FL_FLOCK 2
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#include "files.h" #include "files.h"
#include "image.h" #include "image.h"
#include "../protobuf/regfile.pb-c.h" #include "protobuf/regfile.pb-c.h"
#include "../protobuf/ghost-file.pb-c.h" #include "protobuf/ghost-file.pb-c.h"
struct cr_fdset; struct cr_fdset;
struct fd_parms; struct fd_parms;
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#include "list.h" #include "list.h"
#include "image.h" #include "image.h"
#include "../protobuf/fdinfo.pb-c.h" #include "protobuf/fdinfo.pb-c.h"
#include "../protobuf/fown.pb-c.h" #include "protobuf/fown.pb-c.h"
#include "../protobuf/vma.pb-c.h" #include "protobuf/vma.pb-c.h"
struct pstree_item; struct pstree_item;
struct file_desc; struct file_desc;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "image.h" #include "image.h"
#include "util-net.h" #include "util-net.h"
#include "../protobuf/vma.pb-c.h" #include "protobuf/vma.pb-c.h"
#define __head __used __section(.head.text) #define __head __used __section(.head.text)
......
#ifndef __CR_PIPES_H__ #ifndef __CR_PIPES_H__
#define __CR_PIPES_H__ #define __CR_PIPES_H__
#include "../protobuf/pipe-data.pb-c.h" #include "protobuf/pipe-data.pb-c.h"
extern int collect_pipes(void); extern int collect_pipes(void);
extern void mark_pipe_master(void); extern void mark_pipe_master(void);
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
#include "image.h" #include "image.h"
#include "list.h" #include "list.h"
#include "../protobuf/eventfd.pb-c.h" #include "protobuf/eventfd.pb-c.h"
#include "../protobuf/eventpoll.pb-c.h" #include "protobuf/eventpoll.pb-c.h"
#include "../protobuf/signalfd.pb-c.h" #include "protobuf/signalfd.pb-c.h"
#include "../protobuf/fsnotify.pb-c.h" #include "protobuf/fsnotify.pb-c.h"
#define PROC_TASK_COMM_LEN 32 #define PROC_TASK_COMM_LEN 32
#define PROC_TASK_COMM_LEN_FMT "(%31s" #define PROC_TASK_COMM_LEN_FMT "(%31s"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "list.h" #include "list.h"
#include "crtools.h" #include "crtools.h"
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
/* /*
* That's the init process which usually inherit * That's the init process which usually inherit
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
#include "crtools.h" #include "crtools.h"
#include "fpu.h" #include "fpu.h"
#include "../protobuf/mm.pb-c.h" #include "protobuf/mm.pb-c.h"
#include "../protobuf/vma.pb-c.h" #include "protobuf/vma.pb-c.h"
#include "../protobuf/creds.pb-c.h" #include "protobuf/creds.pb-c.h"
#include "../protobuf/core.pb-c.h" #include "protobuf/core.pb-c.h"
struct task_restore_core_args; struct task_restore_core_args;
struct thread_restore_args; struct thread_restore_args;
......
#ifndef __CR_SHMEM_H__ #ifndef __CR_SHMEM_H__
#define __CR_SHMEM_H__ #define __CR_SHMEM_H__
#include "../protobuf/vma.pb-c.h" #include "protobuf/vma.pb-c.h"
int prepare_shmem_pid(int pid); int prepare_shmem_pid(int pid);
int prepare_shmem_restore(void); int prepare_shmem_restore(void);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "files.h" #include "files.h"
#include "list.h" #include "list.h"
#include "protobuf.h" #include "protobuf.h"
#include "../protobuf/sk-inet.pb-c.h" #include "protobuf/sk-inet.pb-c.h"
#define INET_ADDR_LEN 40 #define INET_ADDR_LEN 40
#ifndef TCP_REPAIR #ifndef TCP_REPAIR
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "asm/types.h" #include "asm/types.h"
#include "protobuf.h" #include "protobuf.h"
#include "../protobuf/sk-opts.pb-c.h" #include "protobuf/sk-opts.pb-c.h"
struct fdinfo_list_entry; struct fdinfo_list_entry;
struct sk_opts_entry; struct sk_opts_entry;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "asm/types.h" #include "asm/types.h"
#include "log.h" #include "log.h"
#include "../protobuf/vma.pb-c.h" #include "protobuf/vma.pb-c.h"
#define PREF_SHIFT_OP(pref, op, size) ((size) op (pref ##BYTES_SHIFT)) #define PREF_SHIFT_OP(pref, op, size) ((size) op (pref ##BYTES_SHIFT))
#define KBYTES_SHIFT 10 #define KBYTES_SHIFT 10
......
CFLAGS += -c -I$(SRC_DIR)/protobuf/ -I$(SRC_DIR)/syscall/ CFLAGS += -c -I$(SRC_DIR)/syscall/
CFLAGS += -fpie -Wa,--noexecstack -fno-strict-aliasing CFLAGS += -fpie -Wa,--noexecstack -fno-strict-aliasing
GEN-OFFSETS := gen-offsets.sh GEN-OFFSETS := gen-offsets.sh
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "lock.h" #include "lock.h"
#include "restorer.h" #include "restorer.h"
#include "creds.pb-c.h" #include "protobuf/creds.pb-c.h"
#include "asm/restorer.h" #include "asm/restorer.h"
......
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