[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/10: build: Add setns syscall wrapper.
From: |
David Thompson |
Subject: |
04/10: build: Add setns syscall wrapper. |
Date: |
Mon, 08 Jun 2015 14:04:26 +0000 |
davexunit pushed a commit to branch wip-container
in repository guix.
commit 581345d7413e1189b7af3ee23c4c9edd34d8d186
Author: David Thompson <address@hidden>
Date: Mon Jun 8 08:43:05 2015 -0400
build: Add setns syscall wrapper.
* guix/build/syscalls.scm (setns): New procedure.
---
guix/build/syscalls.scm | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index a47d333..72a91a5 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -49,6 +49,7 @@
CLONE_NEWPID
CLONE_NEWNET
clone
+ setns
IFF_UP
IFF_BROADCAST
@@ -287,6 +288,15 @@ Unlike the fork system call, clone accepts FLAGS that
specify which resources
are shared between the parent and child processes."
(proc syscall-id flags %null-pointer))))
+(define setns
+ (let* ((ptr (dynamic-func "setns" (dynamic-link)))
+ (proc (pointer->procedure int ptr (list int int))))
+ (lambda (fdes nstype)
+ "Reassociate the current process with the namespace specified by FDES.
+NSTYPE specifies which type of namespace the current process may be
+reassociated with, or 0 if there is no such limitation."
+ (proc fdes nstype))))
+
;;;
;;; Packed structures.
- branch wip-container created (now 3e19b4d), David Thompson, 2015/06/08
- 01/10: build: syscalls: Add clone syscall wrapper., David Thompson, 2015/06/08
- 02/10: build: syscalls: Add additional mount flags., David Thompson, 2015/06/08
- 05/10: fixup linux container module., David Thompson, 2015/06/08
- 06/10: fixup linux container module., David Thompson, 2015/06/08
- 03/10: gnu: Add Linux container module., David Thompson, 2015/06/08
- 07/10: gnu: Add Linux container system script., David Thompson, 2015/06/08
- 04/10: build: Add setns syscall wrapper.,
David Thompson <=
- 09/10: gnu: system: Add operating-system-derivation/container., David Thompson, 2015/06/08
- 08/10: gnu: system: Do not activate firmware when activating a container., David Thompson, 2015/06/08
- 10/10: scripts: system: Add 'container' subcommand., David Thompson, 2015/06/08