From fdfef4b485503baae396b7bb9c6197ebc7d7e71c Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Fri, 15 Feb 2013 17:33:06 +0400 Subject: [PATCH] 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: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- Makefile | 2 +- arch/arm/crtools.c | 4 ++-- arch/arm/include/asm/restorer.h | 2 +- arch/arm/include/asm/types.h | 2 +- arch/x86/crtools.c | 4 ++-- arch/x86/include/asm/restorer.h | 2 +- arch/x86/include/asm/types.h | 2 +- include/crtools.h | 2 +- include/file-ids.h | 2 +- include/file-lock.h | 2 +- include/files-reg.h | 4 ++-- include/files.h | 6 +++--- include/parasite.h | 2 +- include/pipes.h | 2 +- include/proc_parse.h | 8 ++++---- include/pstree.h | 2 +- include/restorer.h | 8 ++++---- include/shmem.h | 2 +- include/sk-inet.h | 2 +- include/sockets.h | 2 +- include/util.h | 2 +- pie/Makefile | 2 +- pie/restorer.c | 2 +- 23 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index c78998c06..63f4660cc 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ ARCH_DIR := $(SRC_DIR)/arch/$(ARCH) $(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 LIBS := -lrt -lpthread -lprotobuf-c diff --git a/arch/arm/crtools.c b/arch/arm/crtools.c index 8428e15b8..76c88704e 100644 --- a/arch/arm/crtools.c +++ b/arch/arm/crtools.c @@ -6,8 +6,8 @@ #include "ptrace.h" #include "asm/processor-flags.h" #include "protobuf.h" -#include "../protobuf/core.pb-c.h" -#include "../protobuf/creds.pb-c.h" +#include "protobuf/core.pb-c.h" +#include "protobuf/creds.pb-c.h" #include "parasite-syscall.h" #include "syscall.h" #include "log.h" diff --git a/arch/arm/include/asm/restorer.h b/arch/arm/include/asm/restorer.h index ea9325581..9f5cecb6c 100644 --- a/arch/arm/include/asm/restorer.h +++ b/arch/arm/include/asm/restorer.h @@ -2,7 +2,7 @@ #define __CR_ASM_RESTORER_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 */ diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h index d068e51c1..069be66c0 100644 --- a/arch/arm/include/asm/types.h +++ b/arch/arm/include/asm/types.h @@ -4,7 +4,7 @@ #include #include #include -#include "../protobuf/core.pb-c.h" +#include "protobuf/core.pb-c.h" #include "asm/bitops.h" diff --git a/arch/x86/crtools.c b/arch/x86/crtools.c index dcb8f55f0..b882faac7 100644 --- a/arch/x86/crtools.c +++ b/arch/x86/crtools.c @@ -6,8 +6,8 @@ #include "ptrace.h" #include "asm/processor-flags.h" #include "protobuf.h" -#include "../protobuf/core.pb-c.h" -#include "../protobuf/creds.pb-c.h" +#include "protobuf/core.pb-c.h" +#include "protobuf/creds.pb-c.h" #include "parasite-syscall.h" #include "syscall.h" #include "log.h" diff --git a/arch/x86/include/asm/restorer.h b/arch/x86/include/asm/restorer.h index 08b53ca9c..959683f36 100644 --- a/arch/x86/include/asm/restorer.h +++ b/arch/x86/include/asm/restorer.h @@ -2,7 +2,7 @@ #define __CR_ASM_RESTORER_H__ #include "asm/types.h" -#include "../protobuf/core.pb-c.h" +#include "protobuf/core.pb-c.h" struct pt_regs { unsigned long r15; diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h index 431ebb863..44218bb6b 100644 --- a/arch/x86/include/asm/types.h +++ b/arch/x86/include/asm/types.h @@ -7,7 +7,7 @@ #include "asm/bitops.h" -#include "../protobuf/core.pb-c.h" +#include "protobuf/core.pb-c.h" /* prctl */ #define ARCH_SET_GS 0x1001 diff --git a/include/crtools.h b/include/crtools.h index 5225aab23..b83cd882d 100644 --- a/include/crtools.h +++ b/include/crtools.h @@ -10,7 +10,7 @@ #include "image.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) diff --git a/include/file-ids.h b/include/file-ids.h index 9e3817391..ce9029d93 100644 --- a/include/file-ids.h +++ b/include/file-ids.h @@ -5,7 +5,7 @@ #include "asm/types.h" #include "rbtree.h" -#include "../protobuf/fdinfo.pb-c.h" +#include "protobuf/fdinfo.pb-c.h" #define FD_PID_INVALID (-2U) #define FD_DESC_INVALID (-3U) diff --git a/include/file-lock.h b/include/file-lock.h index 70b54c87e..7ee3dfae3 100644 --- a/include/file-lock.h +++ b/include/file-lock.h @@ -3,7 +3,7 @@ #include "crtools.h" #include "protobuf.h" -#include "../protobuf/file-lock.pb-c.h" +#include "protobuf/file-lock.pb-c.h" #define FL_POSIX 1 #define FL_FLOCK 2 diff --git a/include/files-reg.h b/include/files-reg.h index b9aeff429..e870d8633 100644 --- a/include/files-reg.h +++ b/include/files-reg.h @@ -5,8 +5,8 @@ #include "files.h" #include "image.h" -#include "../protobuf/regfile.pb-c.h" -#include "../protobuf/ghost-file.pb-c.h" +#include "protobuf/regfile.pb-c.h" +#include "protobuf/ghost-file.pb-c.h" struct cr_fdset; struct fd_parms; diff --git a/include/files.h b/include/files.h index 19e64a14c..f1bd8fae6 100644 --- a/include/files.h +++ b/include/files.h @@ -7,9 +7,9 @@ #include "list.h" #include "image.h" -#include "../protobuf/fdinfo.pb-c.h" -#include "../protobuf/fown.pb-c.h" -#include "../protobuf/vma.pb-c.h" +#include "protobuf/fdinfo.pb-c.h" +#include "protobuf/fown.pb-c.h" +#include "protobuf/vma.pb-c.h" struct pstree_item; struct file_desc; diff --git a/include/parasite.h b/include/parasite.h index 4397873fb..5d5b8df9c 100644 --- a/include/parasite.h +++ b/include/parasite.h @@ -13,7 +13,7 @@ #include "image.h" #include "util-net.h" -#include "../protobuf/vma.pb-c.h" +#include "protobuf/vma.pb-c.h" #define __head __used __section(.head.text) diff --git a/include/pipes.h b/include/pipes.h index 38855e401..02ef80e79 100644 --- a/include/pipes.h +++ b/include/pipes.h @@ -1,7 +1,7 @@ #ifndef __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 void mark_pipe_master(void); diff --git a/include/proc_parse.h b/include/proc_parse.h index ae8a71c63..309cbd538 100644 --- a/include/proc_parse.h +++ b/include/proc_parse.h @@ -6,10 +6,10 @@ #include "image.h" #include "list.h" -#include "../protobuf/eventfd.pb-c.h" -#include "../protobuf/eventpoll.pb-c.h" -#include "../protobuf/signalfd.pb-c.h" -#include "../protobuf/fsnotify.pb-c.h" +#include "protobuf/eventfd.pb-c.h" +#include "protobuf/eventpoll.pb-c.h" +#include "protobuf/signalfd.pb-c.h" +#include "protobuf/fsnotify.pb-c.h" #define PROC_TASK_COMM_LEN 32 #define PROC_TASK_COMM_LEN_FMT "(%31s" diff --git a/include/pstree.h b/include/pstree.h index 6f2223833..b024c3d0e 100644 --- a/include/pstree.h +++ b/include/pstree.h @@ -3,7 +3,7 @@ #include "list.h" #include "crtools.h" -#include "../protobuf/core.pb-c.h" +#include "protobuf/core.pb-c.h" /* * That's the init process which usually inherit diff --git a/include/restorer.h b/include/restorer.h index ea3663561..2b8806fe3 100644 --- a/include/restorer.h +++ b/include/restorer.h @@ -13,10 +13,10 @@ #include "crtools.h" #include "fpu.h" -#include "../protobuf/mm.pb-c.h" -#include "../protobuf/vma.pb-c.h" -#include "../protobuf/creds.pb-c.h" -#include "../protobuf/core.pb-c.h" +#include "protobuf/mm.pb-c.h" +#include "protobuf/vma.pb-c.h" +#include "protobuf/creds.pb-c.h" +#include "protobuf/core.pb-c.h" struct task_restore_core_args; struct thread_restore_args; diff --git a/include/shmem.h b/include/shmem.h index bc7135129..f6ee3e25f 100644 --- a/include/shmem.h +++ b/include/shmem.h @@ -1,7 +1,7 @@ #ifndef __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_restore(void); diff --git a/include/sk-inet.h b/include/sk-inet.h index ea24ab0cd..1540b67d6 100644 --- a/include/sk-inet.h +++ b/include/sk-inet.h @@ -7,7 +7,7 @@ #include "files.h" #include "list.h" #include "protobuf.h" -#include "../protobuf/sk-inet.pb-c.h" +#include "protobuf/sk-inet.pb-c.h" #define INET_ADDR_LEN 40 #ifndef TCP_REPAIR diff --git a/include/sockets.h b/include/sockets.h index 22ffd9b89..cfc1516f3 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -9,7 +9,7 @@ #include "asm/types.h" #include "protobuf.h" -#include "../protobuf/sk-opts.pb-c.h" +#include "protobuf/sk-opts.pb-c.h" struct fdinfo_list_entry; struct sk_opts_entry; diff --git a/include/util.h b/include/util.h index 6ce078382..66238451f 100644 --- a/include/util.h +++ b/include/util.h @@ -16,7 +16,7 @@ #include "asm/types.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 KBYTES_SHIFT 10 diff --git a/pie/Makefile b/pie/Makefile index ce813498c..5c691d577 100644 --- a/pie/Makefile +++ b/pie/Makefile @@ -1,4 +1,4 @@ -CFLAGS += -c -I$(SRC_DIR)/protobuf/ -I$(SRC_DIR)/syscall/ +CFLAGS += -c -I$(SRC_DIR)/syscall/ CFLAGS += -fpie -Wa,--noexecstack -fno-strict-aliasing GEN-OFFSETS := gen-offsets.sh diff --git a/pie/restorer.c b/pie/restorer.c index 0e5f940fa..5168e36fc 100644 --- a/pie/restorer.c +++ b/pie/restorer.c @@ -25,7 +25,7 @@ #include "lock.h" #include "restorer.h" -#include "creds.pb-c.h" +#include "protobuf/creds.pb-c.h" #include "asm/restorer.h"