[systemd-commits] 2 commits - hwdb/60-keyboard.hwdb src/nspawn src/shared

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Tue Dec 16 21:21:58 PST 2014


 hwdb/60-keyboard.hwdb |    4 ++++
 src/nspawn/nspawn.c   |    6 +++---
 src/shared/missing.h  |   10 ++++++++++
 3 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit 60e1651a31c9c0ed1caef1a63f5e3a87156b0b1e
Author: Ken Werner <ken at linux.vnet.ibm.com>
Date:   Tue Dec 16 18:06:41 2014 +0100

    nspawn: fix invocation of the raw clone() system call on s390 and cris
    
    Since the order of the first and second arguments of the raw clone() system
    call is reversed on s390 and cris it needs to be invoked differently.

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 9ca53cd..a13c1fc 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -3133,9 +3133,9 @@ int main(int argc, char *argv[]) {
                         goto finish;
                 }
 
-                pid = syscall(__NR_clone, SIGCHLD|CLONE_NEWNS|
-                                          (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)|
-                                          (arg_private_network ? CLONE_NEWNET : 0), NULL);
+                pid = raw_clone(SIGCHLD|CLONE_NEWNS|
+                                (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)|
+                                (arg_private_network ? CLONE_NEWNET : 0), NULL);
                 if (pid < 0) {
                         if (errno == EINVAL)
                                 r = log_error_errno(errno, "clone() failed, do you have namespace support enabled in your kernel? (You need UTS, IPC, PID and NET namespacing built in): %m");
diff --git a/src/shared/missing.h b/src/shared/missing.h
index c547479..bea1254 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -635,3 +635,13 @@ static inline int setns(int fd, int nstype) {
 #ifndef CAP_AUDIT_READ
 #define CAP_AUDIT_READ 37
 #endif
+
+static inline long raw_clone(unsigned long flags, void *child_stack) {
+#if defined(__s390__) || defined(__CRIS__)
+        /* On s390 and cris the order of the first and second arguments
+         * of the raw clone() system call is reversed. */
+        return syscall(__NR_clone, child_stack, flags);
+#else
+        return syscall(__NR_clone, flags, child_stack);
+#endif
+}

commit ef686ae230c55124e3efdc7d756fb1931e10aef4
Author: Marc Schmitzer <marc at marc-schmitzer.de>
Date:   Tue Dec 16 22:14:40 2014 -0500

    hwdb: add Lenovo 3000 N200 special key
    
    https://bugs.freedesktop.org/show_bug.cgi?id=87377

diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 46348b9..af0917e 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -562,6 +562,10 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*3000*:pvr*
  KEYBOARD_KEY_98=suspend                                # Fn+F12 hibernate
  KEYBOARD_KEY_b4=prog1                                  # Lenovo Care
 
+# "Lenovo Care" Key of the 3000 N200
+keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO:pn0769AP2:pvr3000N200:*
+ KEYBOARD_KEY_b4=prog1
+
 # lenovo-ideapad
 keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*:pvr*
 keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*:pvr*



More information about the systemd-commits mailing list