Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 373274 Details for
Bug 505368
sys-auth/consolekit-0.4.6 - consolekit ioctl fails during a VT_WAITACTIVE and fails to declare the current terminal as active
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
consolekit-0.4.6 ck-vt-monitor.c patch
consolekit-0.4.6-ck-vt-monitor.patch (text/plain), 2.66 KB, created by
Jimmy.Jazz
on 2014-03-22 18:03:10 UTC
(
hide
)
Description:
consolekit-0.4.6 ck-vt-monitor.c patch
Filename:
MIME Type:
Creator:
Jimmy.Jazz
Created:
2014-03-22 18:03:10 UTC
Size:
2.66 KB
patch
obsolete
>--- src/ck-vt-monitor.c.ori 2013-07-19 06:15:28.000000000 +0200 >+++ src/ck-vt-monitor.c 2014-03-22 16:33:06.571217691 +0100 >@@ -27,6 +27,24 @@ > #include <string.h> > #include <errno.h> > >+#include <sys/types.h> >+#include <sys/stat.h> >+#include <sys/socket.h> >+#include <sys/ioctl.h> >+ >+#ifdef __linux__ >+#include <linux/kd.h> >+#endif >+ >+#ifdef HAVE_SYS_VT_H >+#include <sys/vt.h> >+#endif >+ >+#if HAVE_SYS_CONSIO_H >+#include <sys/consio.h> >+#endif >+ >+ > #include <glib.h> > #include <glib/gi18n.h> > #include <glib/gstdio.h> >@@ -319,8 +337,49 @@ > > res = ck_wait_for_active_console_num (vt_monitor->priv->vfd, num); > if (! res) { >- /* FIXME: what do we do if it fails? */ >- } else { >+ int fd; >+ const char *errmsg; >+ struct vt_stat vts; >+ guint active; >+ >+ g_warning ("Reopen a console and check again"); >+ >+ fd = vt_monitor->priv->vfd; >+ if (fd != ERROR) { >+ g_debug ("close descriptor %d", fd); >+ close (fd); >+ } >+ >+ fd = ck_get_a_console_fd(); >+ vt_monitor->priv->vfd = fd; >+ >+ if (fd == ERROR) { >+ errmsg = g_strerror (errno); >+ g_warning("Unable to open a console: %s", errmsg); >+ } else { >+ g_debug ("VT_GETSTATE for vt %d", num); >+ if ((res = ioctl(fd, VT_GETSTATE, &vts)) != -1) { >+ if (vts.v_active != num) { >+ res = ck_get_active_console_num(fd, &active); >+ if (! res) { >+ g_warning("Could not determine active console"); >+ active = 0; >+ } >+ vt_monitor->priv->active_num = active; >+ res = ck_wait_for_active_console_num(vt_monitor->priv->vfd, num); >+ if (!res) { >+ errmsg = g_strerror (errno); >+ g_warning("Unable to wait for vt %d activation: %s", num, errmsg); >+ } >+ } >+ } else { >+ errmsg = g_strerror (errno); >+ g_warning("Unable to get console state: %s", errmsg); >+ } >+ } >+ g_debug ("new descriptor is %d", fd); >+ } >+ if (res) { > EventData *event; > > /* add event to queue */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 505368
: 373274