Commit 682d7e54 by dlezcano

Display a warning when the architecture is not supported for checkpoint/restart.

parent 925aaa31
...@@ -41,13 +41,19 @@ ...@@ -41,13 +41,19 @@
#if __i386__ #if __i386__
# define __NR_checkpoint 334 # define __NR_checkpoint 334
#else
# error "Architecture not supported"
#endif
static inline long sys_checkpoint(pid_t pid, int fd, unsigned long flags) static inline long sys_checkpoint(pid_t pid, int fd, unsigned long flags)
{ {
return syscall(__NR_checkpoint, pid, fd, flags); return syscall(__NR_checkpoint, pid, fd, flags);
} }
#else
# warning "Architecture not supported for checkpoint"
static inline long sys_checkpoint(pid_t pid, int fd, unsigned long flags)
{
errno = ENOSYS;
return -1;
}
#endif
int lxc_checkpoint(const char *name, int cfd, unsigned long flags) int lxc_checkpoint(const char *name, int cfd, unsigned long flags)
{ {
......
...@@ -44,13 +44,18 @@ LXC_TTY_HANDLER(SIGQUIT); ...@@ -44,13 +44,18 @@ LXC_TTY_HANDLER(SIGQUIT);
#if __i386__ #if __i386__
# define __NR_restart 335 # define __NR_restart 335
#else
# error "Architecture not supported"
#endif
static inline long sys_restart(pid_t pid, int fd, unsigned long flags) static inline long sys_restart(pid_t pid, int fd, unsigned long flags)
{ {
return syscall(__NR_restart, pid, fd, flags); return syscall(__NR_restart, pid, fd, flags);
} }
#else
static inline long sys_restart(pid_t pid, int fd, unsigned long flags)
{
errno = ENOSYS;
return -1;
}
# warning "Architecture not supported for restart syscall"
#endif
int lxc_restart(const char *name, int cfd, unsigned long flags) int lxc_restart(const char *name, int cfd, unsigned long flags)
{ {
......
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