Skip to contentSkip to conversation

define MNT_DETACH in older userspace

PATCH Applied Serge E. Hallyn 4 participants 5 messages Feb 22, 2010 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 define MNT_DETACH in older userspace

---
 nsexec.c  |    4 ++++
 restart.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
nsexec.c +4 -0
index 79fcc70..90db229 100644
@@ -21,6 +21,10 @@
 #include "eclone.h"
 #include "genstack.h"
 
+#ifndef MNT_DETACH
+#define MNT_DETACH 2
+#endif
+
 extern pid_t getpgid(pid_t pid);
 extern pid_t getsid(pid_t pid);
 
restart.c +4 -0
index 166a499..5d781c2 100644
@@ -39,6 +39,10 @@
 #include "eclone.h"
 #include "genstack.h"
 
+#ifndef MNT_DETACH
+#define MNT_DETACH 2
+#endif
+
 static char usage_str[] =
 "usage: restart [opts]\n"
 "  restart restores from a checkpoint image by first creating in userspace\n"
Signature · 1 line
1.7.0

A message that is not in the archive (sent off-list or not yet received): 20100222174755.GA8329-r/[email protected]

#2 lore raw

Thanks, I had already put together a local fix which adds a compat header -- please use this instead of duplicating the work across files?

From 9d8b8774d4c471f04203b589f49ffe59e1d0cf39 Mon Sep 17 00:00:00 2001
From: Nathan Lynch <[email protected]>
Date: Mon, 22 Feb 2010 11:50:46 -0600
Subject: [PATCH 1/1] user-cr: add compat.h; define MNT_DETACH

"nsexec: remount proc and devpts" introduced usage of the MNT_DETACH umount2 flag, which is not defined even in some relatively recent glibc headers (e.g. Fedora 10/glibc 2.9-3). Add a compat.h header where we can add fixups like this for older build environments.

---
 include/compat.h |    7 +++++++
 nsexec.c         |    1 +
 restart.c        |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 include/compat.h
include/compat.h new file +7 -0
new file mode 100644
index 0000000..0d5ade4
@@ -0,0 +1,7 @@
+#ifndef USER_CR_COMPAT_H
+
+#ifndef MNT_DETACH
+#define MNT_DETACH 2
+#endif
+
+#endif /* USER_CR_COMPAT_H */
nsexec.c +1 -0
index 7a0294c..1cf9c97 100644
@@ -20,6 +20,7 @@
 #include "clone.h"
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 extern pid_t getpgid(pid_t pid);
 extern pid_t getsid(pid_t pid);
restart.c +1 -0
index 166a499..f5d23bb 100644
@@ -38,6 +38,7 @@
 
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 static char usage_str[] =
 "usage: restart [opts]\n"
Signature · 1 line
1.6.0.6

A message that is not in the archive (sent off-list or not yet received): 1266861478.3760.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

Acked-by Serge Hallyn
#4 lore raw
Quoted 8 lines · Nathan Lynch

Thanks, I had already put together a local fix which adds a compat header -- please use this instead of duplicating the work across files?

Quoted 1 line

From 9d8b8774d4c471f04203b589f49ffe59e1d0cf39 Mon Sep 17 00:00:00 2001

From: Nathan Lynch <[email protected]>
Date: Mon, 22 Feb 2010 11:50:46 -0600
Subject: [PATCH 1/1] user-cr: add compat.h; define MNT_DETACH

Quoted 6 lines

"nsexec: remount proc and devpts" introduced usage of the MNT_DETACH umount2 flag, which is not defined even in some relatively recent glibc headers (e.g. Fedora 10/glibc 2.9-3). Add a compat.h header where we can add fixups like this for older build environments.

thanks,
-serge

Quoted 53 lines
---
 include/compat.h |    7 +++++++
 nsexec.c         |    1 +
 restart.c        |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 include/compat.h
include/compat.h new file +7 -0
new file mode 100644
index 0000000..0d5ade4
@@ -0,0 +1,7 @@
+#ifndef USER_CR_COMPAT_H
+
+#ifndef MNT_DETACH
+#define MNT_DETACH 2
+#endif
+
+#endif /* USER_CR_COMPAT_H */
nsexec.c +1 -0
index 7a0294c..1cf9c97 100644
@@ -20,6 +20,7 @@
 #include "clone.h"
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 extern pid_t getpgid(pid_t pid);
 extern pid_t getsid(pid_t pid);
restart.c +1 -0
index 166a499..f5d23bb 100644
@@ -38,6 +38,7 @@
 
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 static char usage_str[] =
 "usage: restart [opts]\n"
Signature · 8 lines
1.6.0.6



_______________________________________________
Containers mailing list
Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers
#5 lore raw
In reply to a message not in the archive
Quoted 2 lines · Nathan Lynch

Thanks, I had already put together a local fix which adds a compat header -- please use this instead of duplicating the work across files?

Sorry, please use this one instead - fixed include guard in compat.h

From c0869556338592a92bad3b587d394add82267f99 Mon Sep 17 00:00:00 2001
From: Nathan Lynch <[email protected]>
Date: Mon, 22 Feb 2010 11:50:46 -0600
Subject: [PATCH 1/1] user-cr: add compat.h; define MNT_DETACH

"nsexec: remount proc and devpts" introduced usage of the MNT_DETACH umount2 flag, which is not defined even in some relatively recent glibc headers (e.g. Fedora 10/glibc 2.9-3). Add a compat.h header where we can add fixups like this for older build environments.

---
 include/compat.h |    8 ++++++++
 nsexec.c         |    1 +
 restart.c        |    1 +
 3 files changed, 10 insertions(+), 0 deletions(-)
 create mode 100644 include/compat.h
include/compat.h new file +8 -0
new file mode 100644
index 0000000..bcdd149
@@ -0,0 +1,8 @@
+#ifndef USER_CR_COMPAT_H
+#define USER_CR_COMPAT_H
+
+#ifndef MNT_DETACH
+#define MNT_DETACH 2
+#endif
+
+#endif /* USER_CR_COMPAT_H */
nsexec.c +1 -0
index 7a0294c..1cf9c97 100644
@@ -20,6 +20,7 @@
 #include "clone.h"
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 extern pid_t getpgid(pid_t pid);
 extern pid_t getsid(pid_t pid);
restart.c +1 -0
index 166a499..f5d23bb 100644
@@ -38,6 +38,7 @@
 
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 static char usage_str[] =
 "usage: restart [opts]\n"
Signature · 1 line
1.6.0.6

A message that is not in the archive (sent off-list or not yet received): 1266862049.12720.1.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

Applied
#7 lore raw

Thanks, applied.

Quoted 62 lines · Nathan Lynch
Quoted 2 lines · Nathan Lynch

Thanks, I had already put together a local fix which adds a compat header -- please use this instead of duplicating the work across files?

Sorry, please use this one instead - fixed include guard in compat.h

Quoted 1 line

From c0869556338592a92bad3b587d394add82267f99 Mon Sep 17 00:00:00 2001

From: Nathan Lynch <[email protected]>
Date: Mon, 22 Feb 2010 11:50:46 -0600
Subject: [PATCH 1/1] user-cr: add compat.h; define MNT_DETACH

"nsexec: remount proc and devpts" introduced usage of the MNT_DETACH umount2 flag, which is not defined even in some relatively recent glibc headers (e.g. Fedora 10/glibc 2.9-3). Add a compat.h header where we can add fixups like this for older build environments.

---
 include/compat.h |    8 ++++++++
 nsexec.c         |    1 +
 restart.c        |    1 +
 3 files changed, 10 insertions(+), 0 deletions(-)
 create mode 100644 include/compat.h
include/compat.h new file +8 -0
new file mode 100644
index 0000000..bcdd149
@@ -0,0 +1,8 @@
+#ifndef USER_CR_COMPAT_H
+#define USER_CR_COMPAT_H
+
+#ifndef MNT_DETACH
+#define MNT_DETACH 2
+#endif
+
+#endif /* USER_CR_COMPAT_H */
nsexec.c +1 -0
index 7a0294c..1cf9c97 100644
@@ -20,6 +20,7 @@
 #include "clone.h"
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 extern pid_t getpgid(pid_t pid);
 extern pid_t getsid(pid_t pid);
restart.c +1 -0
index 166a499..f5d23bb 100644
@@ -38,6 +38,7 @@
 
 #include "eclone.h"
 #include "genstack.h"
+#include "compat.h"
 
 static char usage_str[] =
 "usage: restart [opts]\n"