2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

headers: Move fcntl related data to include/fcntl.h

fcntl data is arch independent, so move it out of include/asm/type.h

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2013-11-14 19:19:49 +04:00
committed by Pavel Emelyanov
parent 98efb3c904
commit 8f64a14a03
13 changed files with 42 additions and 54 deletions

View File

@@ -36,21 +36,6 @@
#define PR_GET_TID_ADDRESS 40
/* fcntl */
#ifndef F_LINUX_SPECIFIC_BASE
#define F_LINUX_SPECIFIC_BASE 1024
#endif
#ifndef F_SETPIPE_SZ
# define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
#endif
#ifndef F_GETPIPE_SZ
# define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
#endif
#ifndef F_GETOWNER_UIDS
#define F_GETOWNER_UIDS 17
#endif
#define CLONE_CHILD_USEPID 0x02000000
#define CLONE_VFORK 0x00004000
@@ -172,18 +157,6 @@ enum kcmp_type {
# define SCM_MAX_FD 253
#endif
#include <fcntl.h>
#ifndef F_SETOWN_EX
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
struct f_owner_ex {
int type;
pid_t pid;
};
#endif
/* File handle */
typedef struct {
u32 bytes;

View File

@@ -46,21 +46,6 @@
#define PR_GET_TID_ADDRESS 40
/* fcntl */
#ifndef F_LINUX_SPECIFIC_BASE
#define F_LINUX_SPECIFIC_BASE 1024
#endif
#ifndef F_SETPIPE_SZ
# define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
#endif
#ifndef F_GETPIPE_SZ
# define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
#endif
#ifndef F_GETOWNER_UIDS
#define F_GETOWNER_UIDS 17
#endif
#define CLONE_CHILD_USEPID 0x02000000
#define CLONE_VFORK 0x00004000
@@ -196,18 +181,6 @@ enum kcmp_type {
# define SCM_MAX_FD 253
#endif
#include <fcntl.h>
#ifndef F_SETOWN_EX
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
struct f_owner_ex {
int type;
pid_t pid;
};
#endif
/* File handle */
typedef struct {
u32 bytes;

View File

@@ -1,5 +1,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <fcntl.h>
#include "crtools.h"
#include "cr_options.h"
#include "fdset.h"

32
include/fcntl.h Normal file
View File

@@ -0,0 +1,32 @@
#ifndef __CR_ASM_GENERIC_FCNTL_H__
#define __CR_ASM_GENERIC_FCNTL_H__
#include <sys/types.h>
#include <fcntl.h>
#ifndef F_SETOWN_EX
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
struct f_owner_ex {
int type;
pid_t pid;
};
#endif
#ifndef F_GETOWNER_UIDS
#define F_GETOWNER_UIDS 17
#endif
#ifndef F_LINUX_SPECIFIC_BASE
#define F_LINUX_SPECIFIC_BASE 1024
#endif
#ifndef F_SETPIPE_SZ
# define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
#endif
#ifndef F_GETPIPE_SZ
# define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
#endif
#endif /* __CR_ASM_GENERIC_FCNTL_H__ */

View File

@@ -3,6 +3,7 @@
#include "compiler.h"
#include "asm/types.h"
#include "fcntl.h"
#include "lock.h"
#include "list.h"
#include "image.h"

1
mem.c
View File

@@ -2,6 +2,7 @@
#include <stdio.h>
#include <sys/mman.h>
#include <errno.h>
#include <fcntl.h>
#include "cr_options.h"
#include "servicefd.h"

View File

@@ -1,4 +1,5 @@
#include <unistd.h>
#include <fcntl.h>
#undef LOG_PREFIX
#define LOG_PREFIX "page-pipe: "

View File

@@ -2,6 +2,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include "cr_options.h"
#include "servicefd.h"

View File

@@ -8,6 +8,7 @@
#include "syscall.h"
#include "parasite.h"
#include "fcntl.h"
#include "lock.h"
#include "vdso.h"
#include "log.h"

View File

@@ -16,6 +16,7 @@
#endif
#include "util-pie.h"
#include "fcntl.h"
static void scm_fdset_init_chunk(struct scm_fdset *fdset, int nr_fds)
{

View File

@@ -8,6 +8,7 @@
#include "asm/string.h"
#include "asm/types.h"
#include "syscall.h"
#include "fcntl.h"
#include "log.h"
#include "util-pie.h"

View File

@@ -1,6 +1,7 @@
#include <unistd.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <fcntl.h>
#include "pid.h"
#include "shmem.h"

View File

@@ -1,4 +1,5 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include "asm/atomic.h"
#include "protobuf.h"