]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Display a warning when the architecture is not supported for checkpoint/restart.
authordlezcano <dlezcano>
Fri, 19 Sep 2008 11:17:23 +0000 (11:17 +0000)
committerdlezcano <dlezcano>
Fri, 19 Sep 2008 11:17:23 +0000 (11:17 +0000)
src/lxc/checkpoint.c
src/lxc/restart.c

index 954ee3353ab6d5441631bc422b997a67ea7b0e59..f9625b68ec0bc01cc50662510d5afd0dd8670a5e 100644 (file)
 
 #if __i386__
 #    define __NR_checkpoint 334
-#else
-#    error "Architecture not supported"
-#endif
 static inline long sys_checkpoint(pid_t pid, int fd, unsigned long 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)
 {
index b4ebb689905b98628f67ad0efda1aa0fa53e9225..b2729002d9b54da79cec6c444c9a6f0085d5493f 100644 (file)
@@ -44,13 +44,18 @@ LXC_TTY_HANDLER(SIGQUIT);
 
 #if __i386__
 #    define __NR_restart 335
-#else
-#    error "Architecture not supported"
-#endif
 static inline long sys_restart(pid_t pid, int fd, unsigned long 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)
 {