summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2010-11-17 06:51:29 +0100
committerMichael Biebl <biebl@debian.org>2010-11-17 06:51:29 +0100
commit836a1deaef0e4c02b992e4f4e0e3d0ef9ed3abe1 (patch)
tree53a2280a13bd28741cadf47c5c20aef18bdfc963
parente8a1fe8000d5356d6eba5f9bd0ea8441f29f0dcd (diff)
parenta97ae561891b3a7e78c0482b91c7c3f0d885100c (diff)
downloadconsolekit-836a1deaef0e4c02b992e4f4e0e3d0ef9ed3abe1.tar.gz
Merge commit 'upstream/0.4.3'
-rw-r--r--ChangeLog148
-rw-r--r--NEWS7
-rwxr-xr-xconfigure31
-rw-r--r--configure.ac8
-rw-r--r--data/Makefile.am5
-rw-r--r--data/Makefile.in5
-rw-r--r--data/console-kit-log-system-restart.service.in5
-rw-r--r--data/console-kit-log-system-start.service.in5
-rw-r--r--data/console-kit-log-system-stop.service.in5
-rw-r--r--doc/dbus/ConsoleKit.xml4
-rw-r--r--src/ck-manager.c1
-rw-r--r--src/ck-seat.c1
-rw-r--r--src/ck-session-leader.c1
-rw-r--r--src/ck-session.c1
-rw-r--r--src/ck-sysdeps-unix.c44
-rw-r--r--src/ck-sysdeps.h2
-rw-r--r--src/ck-vt-monitor.c49
-rw-r--r--src/main.c1
-rw-r--r--tools/list-sessions.c1
19 files changed, 204 insertions, 120 deletions
diff --git a/ChangeLog b/ChangeLog
index dcdd68b..25e6b11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,151 @@
+commit bea922dbab5fb65997c62a98585a35741cbb1a5a
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Wed Nov 17 02:03:34 2010 +0100
+
+ update NEWS
+
+ NEWS | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 72bc55ded76c567adee241094ba3147c72706f79
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Wed Nov 17 01:50:46 2010 +0100
+
+ Revert "linux: Use VT_WAITEVENT if available to avoid spawn too
+ many threads"
+
+ This reverts commit 2782cc8d4950effbc4407455e72bd4750cef6e11.
+
+ VT_WAITEVENT is racy unfortunately, since events that happen
+ between the
+ time we woke up from a VT_WAITEVENT and we go into the next
+ VT_WAITEVENT
+ are lost completely.
+
+ NEWS | 1 -
+ src/ck-sysdeps-unix.c | 44 --------------------------------------------
+ src/ck-sysdeps.h | 2 --
+ src/ck-vt-monitor.c | 48
+ ++++++++----------------------------------------
+ 4 files changed, 8 insertions(+), 87 deletions(-)
+
+commit d36415dcc3cd26a7d1def2f12b4d1c59e13d704e
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Wed Nov 17 01:49:37 2010 +0100
+
+ Revert "linux: Check for VT_WAITEVENT ioctl during runtime"
+
+ This reverts commit 24dc214f55e7c7c17d888d0ccf94cd3625767462.
+
+ VT_WAITEVENT is racy unfortunately, since events that happen
+ between the
+ time we woke up from a VT_WAITEVENT and we go into the next
+ VT_WAITEVENT
+ are lost completely.
+
+ src/ck-vt-monitor.c | 58
+ ++++++++-------------------------------------------
+ 1 files changed, 9 insertions(+), 49 deletions(-)
+
+commit e74c174728bfa582d8187392bdbc11fe940c2df3
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Wed Nov 17 00:45:40 2010 +0100
+
+ systemd: simplify unit files a little
+
+ data/console-kit-log-system-restart.service.in | 6 +++---
+ data/console-kit-log-system-start.service.in | 6 +++---
+ data/console-kit-log-system-stop.service.in | 6 +++---
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 8564260aa0a2ab18f908079f886f7689844bfad5
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Wed Nov 17 00:45:16 2010 +0100
+
+ systemd: log shutdown when doing kexec reboot
+
+ data/Makefile.am | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 25b5d47b961542ceca5f589cc69041b2d941c054
+Author: Michael Biebl <biebl@debian.org>
+Date: Sun Sep 19 21:17:26 2010 +0200
+
+ dbus: bump dependency on dbus-glib to 0.82
+
+ dbus-glib >= 0.82 requires dbus >= 1.1 so we can safely remove
+ DBUS_API_SUBJECT_TO_CHANGE.
+
+ configure.ac | 2 +-
+ src/ck-manager.c | 1 -
+ src/ck-seat.c | 1 -
+ src/ck-session-leader.c | 1 -
+ src/ck-session.c | 1 -
+ src/ck-vt-monitor.c | 1 -
+ src/main.c | 1 -
+ tools/list-sessions.c | 1 -
+ 8 files changed, 1 insertions(+), 8 deletions(-)
+
+commit 24dc214f55e7c7c17d888d0ccf94cd3625767462
+Author: Michael Biebl <biebl@debian.org>
+Date: Mon Sep 20 00:45:16 2010 +0200
+
+ linux: Check for VT_WAITEVENT ioctl during runtime
+
+ Since 2782cc8d4950effbc4407455e72bd4750cef6e11 ConsoleKit fails, if it
+ has been compiled on a linux kernel >= 2.6.32 but is run with an older
+ kernel. Check for VT_WAITEVENT ioctl during runtime and fallback
+ to the
+ old behaviour of creating a thread for every possible vt.
+
+ src/ck-vt-monitor.c | 58
+ +++++++++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 49 insertions(+), 9 deletions(-)
+
+commit 2d16bc565247b8d8653e7eb4a7a6b0d940142bb6
+Author: Michael Biebl <biebl@debian.org>
+Date: Mon Sep 6 22:52:25 2010 +0200
+
+ build-sys: Bump GLIB_REQUIRED_VERSION to 2.14 for GRegex
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=30041
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 95ba1f7d70251830cf1dc0e0516ea0a4715272df
+Author: Luca Favatella <slackydeb@gmail.com>
+Date: Mon Sep 20 00:13:33 2010 +0200
+
+ build-sys: extend configure check for kfreebsd
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=30051
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511270
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c163d26a97f4f69422ec4ea0cfe4c7e211d824c1
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Tue Sep 14 01:08:06 2010 +0200
+
+ systemd: make sure the file system is writable before we write
+ log data
+
+ data/console-kit-log-system-restart.service.in | 3 ++-
+ data/console-kit-log-system-start.service.in | 3 ++-
+ data/console-kit-log-system-stop.service.in | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 146e68f5c39653ba5878c6f32b3700d7fbabf777
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Tue Sep 7 02:58:59 2010 +0200
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
commit 55803876769bd0903cb0efda597bfd5a657adb86
Author: Lennart Poettering <lennart@poettering.net>
Date: Mon Sep 6 16:34:13 2010 +0200
diff --git a/NEWS b/NEWS
index 807e9c4..3d56f7d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,11 @@
==============
+Version 0.4.3
+==============
+
+ * Revert VT_WAITEVENT usage, since it is racy (Lennart Poettering)
+ * systemd fixes (Lennart Poettering)
+
+==============
Version 0.4.2
==============
diff --git a/configure b/configure
index c94f6a7..13ef535 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.66 for ConsoleKit 0.4.2.
+# Generated by GNU Autoconf 2.66 for ConsoleKit 0.4.3.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit>.
#
@@ -563,8 +563,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ConsoleKit'
PACKAGE_TARNAME='ConsoleKit'
-PACKAGE_VERSION='0.4.2'
-PACKAGE_STRING='ConsoleKit 0.4.2'
+PACKAGE_VERSION='0.4.3'
+PACKAGE_STRING='ConsoleKit 0.4.3'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit'
PACKAGE_URL=''
@@ -818,6 +818,11 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
+CPPFLAGS
+CC
+LDFLAGS
+LIBS
+CPPFLAGS
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
@@ -1374,7 +1379,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ConsoleKit 0.4.2 to adapt to many kinds of systems.
+\`configure' configures ConsoleKit 0.4.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1444,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ConsoleKit 0.4.2:";;
+ short | recursive ) echo "Configuration of ConsoleKit 0.4.3:";;
esac
cat <<\_ACEOF
@@ -1590,7 +1595,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ConsoleKit configure 0.4.2
+ConsoleKit configure 0.4.3
generated by GNU Autoconf 2.66
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1959,7 +1964,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ConsoleKit $as_me 0.4.2, which was
+It was created by ConsoleKit $as_me 0.4.3, which was
generated by GNU Autoconf 2.66. Invocation command line was
$ $0 $@
@@ -2777,7 +2782,7 @@ fi
# Define the identity of the package.
PACKAGE='ConsoleKit'
- VERSION='0.4.2'
+ VERSION='0.4.3'
cat >>confdefs.h <<_ACEOF
@@ -12449,8 +12454,8 @@ $as_echo "$LINGUAS" >&6; }
# Dependencies
-DBUS_REQUIRED_VERSION=0.30
-GLIB_REQUIRED_VERSION=2.7.0
+DBUS_REQUIRED_VERSION=0.82
+GLIB_REQUIRED_VERSION=2.14
X11_REQUIRED_VERSION=1.0.0
POLKIT_REQUIRED_VERSION=0.92
@@ -13502,7 +13507,7 @@ fi
CK_BACKEND=""
KVM_LIBS=""
case "$host" in
- *-*-freebsd*)
+ *-*-freebsd* | *-*-kfreebsd*-gnu)
CK_BACKEND="freebsd"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_openfiles in -lkvm" >&5
$as_echo_n "checking for kvm_openfiles in -lkvm... " >&6; }
@@ -14605,7 +14610,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ConsoleKit $as_me 0.4.2, which was
+This file was extended by ConsoleKit $as_me 0.4.3, which was
generated by GNU Autoconf 2.66. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14671,7 +14676,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ConsoleKit config.status 0.4.2
+ConsoleKit config.status 0.4.3
configured by $0, generated by GNU Autoconf 2.66,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 17afab8..5ac60f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
AC_PREREQ(2.59c)
AC_INIT([ConsoleKit],
- [0.4.2],
+ [0.4.3],
[https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit],
[ConsoleKit])
@@ -35,8 +35,8 @@ AM_GLIB_GNU_GETTEXT
# Dependencies
-DBUS_REQUIRED_VERSION=0.30
-GLIB_REQUIRED_VERSION=2.7.0
+DBUS_REQUIRED_VERSION=0.82
+GLIB_REQUIRED_VERSION=2.14
X11_REQUIRED_VERSION=1.0.0
POLKIT_REQUIRED_VERSION=0.92
@@ -176,7 +176,7 @@ dnl ---------------------------------------------------------------------------
CK_BACKEND=""
KVM_LIBS=""
case "$host" in
- *-*-freebsd*)
+ *-*-freebsd* | *-*-kfreebsd*-gnu)
CK_BACKEND="freebsd"
AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes,
AC_MSG_ERROR([Unable to find libkvm which is needed on FreeBSD]))
diff --git a/data/Makefile.am b/data/Makefile.am
index bf9e43b..c45f15b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -44,7 +44,8 @@ install-data-hook:
$(DESTDIR)$(systemdsystemunitdir)/basic.target.wants \
$(DESTDIR)$(systemdsystemunitdir)/halt.target.wants \
$(DESTDIR)$(systemdsystemunitdir)/poweroff.target.wants \
- $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants
+ $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants \
+ $(DESTDIR)$(systemdsystemunitdir)/kexec.target.wants
( cd $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants && \
$(LN_S) ../console-kit-log-system-start.service )
( cd $(DESTDIR)$(systemdsystemunitdir)/halt.target.wants && \
@@ -53,6 +54,8 @@ install-data-hook:
$(LN_S) ../console-kit-log-system-stop.service )
( cd $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants && \
$(LN_S) ../console-kit-log-system-restart.service )
+ ( cd $(DESTDIR)$(systemdsystemunitdir)/kexec.target.wants && \
+ $(LN_S) ../console-kit-log-system-restart.service )
endif
edit = sed \
diff --git a/data/Makefile.in b/data/Makefile.in
index f8068d4..8ef8fa8 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -613,7 +613,8 @@ $(service_DATA): $(service_in_files) Makefile
@HAVE_SYSTEMD_TRUE@ $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants \
@HAVE_SYSTEMD_TRUE@ $(DESTDIR)$(systemdsystemunitdir)/halt.target.wants \
@HAVE_SYSTEMD_TRUE@ $(DESTDIR)$(systemdsystemunitdir)/poweroff.target.wants \
-@HAVE_SYSTEMD_TRUE@ $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants
+@HAVE_SYSTEMD_TRUE@ $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants \
+@HAVE_SYSTEMD_TRUE@ $(DESTDIR)$(systemdsystemunitdir)/kexec.target.wants
@HAVE_SYSTEMD_TRUE@ ( cd $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants && \
@HAVE_SYSTEMD_TRUE@ $(LN_S) ../console-kit-log-system-start.service )
@HAVE_SYSTEMD_TRUE@ ( cd $(DESTDIR)$(systemdsystemunitdir)/halt.target.wants && \
@@ -622,6 +623,8 @@ $(service_DATA): $(service_in_files) Makefile
@HAVE_SYSTEMD_TRUE@ $(LN_S) ../console-kit-log-system-stop.service )
@HAVE_SYSTEMD_TRUE@ ( cd $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants && \
@HAVE_SYSTEMD_TRUE@ $(LN_S) ../console-kit-log-system-restart.service )
+@HAVE_SYSTEMD_TRUE@ ( cd $(DESTDIR)$(systemdsystemunitdir)/kexec.target.wants && \
+@HAVE_SYSTEMD_TRUE@ $(LN_S) ../console-kit-log-system-restart.service )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/data/console-kit-log-system-restart.service.in b/data/console-kit-log-system-restart.service.in
index 905b330..2e2974e 100644
--- a/data/console-kit-log-system-restart.service.in
+++ b/data/console-kit-log-system-restart.service.in
@@ -1,8 +1,9 @@
[Unit]
Description=Console System Reboot Logging
DefaultDependencies=no
-Before=poweroff.service reboot.service halt.service killall.service
-After=console-kit-system-start.service
+Wants=sysinit.target
+After=sysinit.target console-kit-system-start.service
+Before=shutdown.service
[Service]
Type=oneshot
diff --git a/data/console-kit-log-system-start.service.in b/data/console-kit-log-system-start.service.in
index 56e1022..5900bf0 100644
--- a/data/console-kit-log-system-start.service.in
+++ b/data/console-kit-log-system-start.service.in
@@ -1,8 +1,9 @@
[Unit]
Description=Console System Startup Logging
DefaultDependencies=no
-Before=poweroff.service reboot.service halt.service killall.service
-After=local-fs.target
+Wants=sysinit.target
+After=sysinit.target
+Before=shutdown.service
[Service]
Type=oneshot
diff --git a/data/console-kit-log-system-stop.service.in b/data/console-kit-log-system-stop.service.in
index 3292238..97d03e4 100644
--- a/data/console-kit-log-system-stop.service.in
+++ b/data/console-kit-log-system-stop.service.in
@@ -1,8 +1,9 @@
[Unit]
Description=Console System Shutdown Logging
DefaultDependencies=no
-Before=poweroff.service reboot.service halt.service killall.service
-After=console-kit-system-start.service
+Wants=sysinit.target
+After=sysinit.target console-kit-system-start.service
+Before=shutdown.service
[Service]
Type=oneshot
diff --git a/doc/dbus/ConsoleKit.xml b/doc/dbus/ConsoleKit.xml
index 9dd1229..27faa29 100644
--- a/doc/dbus/ConsoleKit.xml
+++ b/doc/dbus/ConsoleKit.xml
@@ -10,8 +10,8 @@
<book id="index">
<bookinfo>
- <title>ConsoleKit 0.4.2 Documentation</title>
- <releaseinfo>Version 0.4.2</releaseinfo>
+ <title>ConsoleKit 0.4.3 Documentation</title>
+ <releaseinfo>Version 0.4.3</releaseinfo>
<authorgroup>
<author>
<firstname>William Jon</firstname>
diff --git a/src/ck-manager.c b/src/ck-manager.c
index ae399e8..a040be3 100644
--- a/src/ck-manager.c
+++ b/src/ck-manager.c
@@ -35,7 +35,6 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <glib-object.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
diff --git a/src/ck-seat.c b/src/ck-seat.c
index 2e48963..59db29f 100644
--- a/src/ck-seat.c
+++ b/src/ck-seat.c
@@ -30,7 +30,6 @@
#include <glib/gi18n.h>
#include <glib-object.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
diff --git a/src/ck-session-leader.c b/src/ck-session-leader.c
index 3702602..c2ab15b 100644
--- a/src/ck-session-leader.c
+++ b/src/ck-session-leader.c
@@ -32,7 +32,6 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <glib-object.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
diff --git a/src/ck-session.c b/src/ck-session.c
index 8a566bb..f291bf3 100644
--- a/src/ck-session.c
+++ b/src/ck-session.c
@@ -32,7 +32,6 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <glib-object.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
diff --git a/src/ck-sysdeps-unix.c b/src/ck-sysdeps-unix.c
index 6a8b5f8..e4ab16b 100644
--- a/src/ck-sysdeps-unix.c
+++ b/src/ck-sysdeps-unix.c
@@ -296,50 +296,6 @@ ck_wait_for_active_console_num (int console_fd,
return ret;
}
-#ifdef VT_WAITEVENT
-gboolean
-ck_wait_for_console_switch (int console_fd,
- guint *num)
-{
- gboolean ret;
- int res;
- struct vt_event vt;
-
- g_assert (console_fd != -1);
-
- again:
- ret = FALSE;
- errno = 0;
- vt.event = VT_EVENT_SWITCH;
- vt.oldev = *num;
- res = ioctl (console_fd, VT_WAITEVENT, &vt);
-
- if (res == ERROR) {
- const char *errmsg;
-
- errmsg = g_strerror (errno);
-
- if (errno == EINTR) {
- g_debug ("Interrupted waiting for native console event: %s",
- errmsg);
- goto again;
- } else if (errno == ENOTSUP) {
- g_debug ("Console event not supported on this system");
- } else {
- g_warning ("Error waiting for native console event: %s",
- errmsg);
- }
- goto out;
- }
-
- ret = TRUE;
- *num = vt.newev;
-
- out:
- return ret;
-}
-#endif
-
gboolean
ck_activate_console_num (int console_fd,
guint num)
diff --git a/src/ck-sysdeps.h b/src/ck-sysdeps.h
index 5dd573f..8f22d52 100644
--- a/src/ck-sysdeps.h
+++ b/src/ck-sysdeps.h
@@ -72,8 +72,6 @@ gboolean ck_activate_console_num (int console_fd,
guint num);
gboolean ck_wait_for_active_console_num (int console_fd,
guint num);
-gboolean ck_wait_for_console_switch (int console_fd,
- guint *num);
G_END_DECLS
diff --git a/src/ck-vt-monitor.c b/src/ck-vt-monitor.c
index 369c63e..cf44983 100644
--- a/src/ck-vt-monitor.c
+++ b/src/ck-vt-monitor.c
@@ -26,14 +26,12 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <glib-object.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -41,11 +39,9 @@
#include "ck-sysdeps.h"
#include "ck-marshal.h"
-#ifdef HAVE_SYS_VT_H
+#if defined (__sun) && defined (HAVE_SYS_VT_H)
#include <sys/vt.h>
-#endif
-
-#ifdef __sun
+#include <signal.h>
#include <stropts.h>
#endif
@@ -166,7 +162,7 @@ ck_vt_monitor_get_active (CkVtMonitor *vt_monitor,
return TRUE;
}
-#if defined(HAVE_SYS_VT_H) && defined(__sun)
+#if defined (__sun) && defined (HAVE_SYS_VT_H)
static void
handle_vt_active (void)
{
@@ -316,31 +312,11 @@ vt_thread_start (ThreadData *data)
{
CkVtMonitor *vt_monitor;
gboolean res;
- guint num;
+ gint32 num;
vt_monitor = data->vt_monitor;
num = data->num;
-#ifdef VT_WAITEVENT
- for (;;) {
- res = ck_wait_for_console_switch (vt_monitor->priv->vfd, &num);
- if (! res) {
- break;
- } else {
- EventData *event;
-
- /* add event to queue */
- event = g_new0 (EventData, 1);
- event->num = num;
- g_debug ("Pushing activation event for VT %d onto queue", num);
-
- g_async_queue_push (vt_monitor->priv->event_queue, event);
-
- /* schedule processing of queue */
- schedule_process_queue (vt_monitor);
- }
- }
-#else
res = ck_wait_for_active_console_num (vt_monitor->priv->vfd, num);
if (! res) {
/* FIXME: what do we do if it fails? */
@@ -357,7 +333,6 @@ vt_thread_start (ThreadData *data)
/* schedule processing of queue */
schedule_process_queue (vt_monitor);
}
-#endif
G_LOCK (hash_lock);
if (vt_monitor->priv->vt_thread_hash != NULL) {
@@ -401,6 +376,10 @@ vt_add_watch_unlocked (CkVtMonitor *vt_monitor,
static void
vt_add_watches (CkVtMonitor *vt_monitor)
{
+ guint max_consoles;
+ int i;
+ gint32 current_num;
+
#if defined (__sun) && !defined (HAVE_SYS_VT_H)
/* Best to do nothing if VT is not supported */
#elif defined (__sun) && defined (HAVE_SYS_VT_H)
@@ -418,19 +397,7 @@ vt_add_watches (CkVtMonitor *vt_monitor)
sigaction (SIGPOLL, &act, NULL);
ioctl (vt_monitor->priv->vfd, I_SETSIG, S_MSG);
-#elif defined (VT_WAITEVENT)
- gpointer id;
-
- G_LOCK (hash_lock);
- id = GINT_TO_POINTER (1);
- if (g_hash_table_lookup (vt_monitor->priv->vt_thread_hash, id) == NULL)
- vt_add_watch_unlocked (vt_monitor, 1);
- G_UNLOCK (hash_lock);
#else
- guint max_consoles;
- int i;
- gint32 current_num;
-
G_LOCK (hash_lock);
current_num = vt_monitor->priv->active_num;
diff --git a/src/main.c b/src/main.c
index f685026..a39bd71 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,7 +34,6 @@
#include <glib/gi18n.h>
#include <glib-object.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
diff --git a/tools/list-sessions.c b/tools/list-sessions.c
index 3933772..c3a020b 100644
--- a/tools/list-sessions.c
+++ b/tools/list-sessions.c
@@ -32,7 +32,6 @@
#include <glib.h>
#include <glib/gi18n.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>