[systemd-commits] 4 commits - src/libsystemd-terminal

David Herrmann dvdhrm at kemper.freedesktop.org
Thu Sep 11 06:32:11 PDT 2014


 src/libsystemd-terminal/evcat.c      |    4 ++--
 src/libsystemd-terminal/idev-evdev.c |    3 +--
 src/libsystemd-terminal/idev.c       |    1 -
 3 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 393a5ba09f7c5360d2e5066c23d43bb82d856173
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Sep 11 15:30:56 2014 +0200

    terminal: drop redundant assertion
    
    This assertion is already there two lines down. Drop the redundant
    assertion.

diff --git a/src/libsystemd-terminal/idev-evdev.c b/src/libsystemd-terminal/idev-evdev.c
index 241743c..6509d10 100644
--- a/src/libsystemd-terminal/idev-evdev.c
+++ b/src/libsystemd-terminal/idev-evdev.c
@@ -858,7 +858,6 @@ static int managed_evdev_new(idev_element **out, idev_session *s, struct udev_de
         int r;
 
         assert_return(s, -EINVAL);
-        assert_return(s->context->sysbus, -EINVAL);
         assert_return(s->managed, -EINVAL);
         assert_return(s->context->sysbus, -EINVAL);
         assert_return(ud, -EINVAL);

commit 667b60341f404d8f18aa0909e34d39e7d6baa56b
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Sep 11 15:29:58 2014 +0200

    terminal: fix wrong return value in idev if fcntl() fails
    
    This might cause >=0 to be returned, even though the method failed. Fix
    this and return -errno.

diff --git a/src/libsystemd-terminal/idev-evdev.c b/src/libsystemd-terminal/idev-evdev.c
index be9b030..241743c 100644
--- a/src/libsystemd-terminal/idev-evdev.c
+++ b/src/libsystemd-terminal/idev-evdev.c
@@ -307,7 +307,7 @@ static int idev_evdev_resume(idev_evdev *evdev, int dev_fd) {
 
         flags = fcntl(fd, F_GETFL, 0);
         if (flags < 0)
-                return r;
+                return -errno;
 
         flags &= O_ACCMODE;
         if (flags == O_WRONLY)

commit c600022303a10155f48a8eab59c6c0ae1b797699
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Sep 11 15:28:37 2014 +0200

    terminal: enable sessions in evcat after taking control
    
    If we enable a session, any probed device might get immediately enabled.
    This might cause TakeDevice() messages to be sent before we call
    TakeControl(). Therefore, enable sessions *after* sending TakeControl() so
    we always succeed if TakeControl() succeeds.

diff --git a/src/libsystemd-terminal/evcat.c b/src/libsystemd-terminal/evcat.c
index 590a30d..8c27fb2 100644
--- a/src/libsystemd-terminal/evcat.c
+++ b/src/libsystemd-terminal/evcat.c
@@ -313,8 +313,6 @@ static int evcat_sysview_fn(sysview_context *c, void *userdata, sysview_event *e
                         return r;
                 }
 
-                idev_session_enable(e->idev_session);
-
                 if (e->managed) {
                         r = sysview_session_take_control(ev->session_add.session);
                         if (r < 0) {
@@ -323,6 +321,8 @@ static int evcat_sysview_fn(sysview_context *c, void *userdata, sysview_event *e
                         }
                 }
 
+                idev_session_enable(e->idev_session);
+
                 break;
         case SYSVIEW_EVENT_SESSION_REMOVE:
                 idev_session_disable(e->idev_session);

commit 1f3752c81ad5d746f90db751425c39c3ed0970ab
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Sep 11 15:27:56 2014 +0200

    terminal: remove unused set.h inclusion in idev
    
    We don't use set.h so no need to include it. We used to include it for
    temporary refs on all idev devices of a session, but that never was pushed
    upstream.

diff --git a/src/libsystemd-terminal/idev.c b/src/libsystemd-terminal/idev.c
index 0ed518c..d37e031 100644
--- a/src/libsystemd-terminal/idev.c
+++ b/src/libsystemd-terminal/idev.c
@@ -33,7 +33,6 @@
 #include "idev-internal.h"
 #include "login-shared.h"
 #include "macro.h"
-#include "set.h"
 #include "udev-util.h"
 #include "util.h"
 



More information about the systemd-commits mailing list