After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 310218 - DragonFly VTs are not supported
DragonFly VTs are not supported
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.8.x
Other All
: Normal minor
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-13 13:05 UTC by Joerg Sonnenberger
Modified: 2005-07-14 20:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joerg Sonnenberger 2005-07-13 13:05:43 UTC
Please describe the problem:
DragonFly provides the very same Virtual Terminal support as FreeBSD, so it
should be used.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
--- daemon/getvt.c.orig	2005-07-10 09:22:22.000000000 +0000
+++ daemon/getvt.c
@@ -18,16 +18,16 @@
 extern int GdmFirstVT;
 extern gboolean GdmVTAllocation;
 
-#if defined (__linux__) || defined (__FreeBSD__)
+#if defined (__linux__) || defined (__FreeBSD__) || defined(__DragonFly__)
 
 #ifdef __linux__
 #include <sys/vt.h>
 #endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/consio.h>
 #endif
 
-#ifdef __FreeBSD__
+#if defined( __FreeBSD__) || defined(__DragonFly__)
 static const char*
 __itovty(int val)
 {
@@ -51,7 +51,7 @@ open_vt (int vtno)
 
 #if defined (__linux__)
 	vtname = g_strdup_printf ("/dev/tty%d", vtno);
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
 	vtname = g_strdup_printf ("/dev/ttyv%s", __itovty(vtno - 1));
 #endif
 	do {
@@ -104,7 +104,7 @@ get_free_vt (int *vtfd)
 
 #if defined (__linux__)
 		if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) || (vtno == -1)) {
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
 		if (ioctl(fd, VT_OPENQRY, &vtno) == -1) {
 #endif
 			vtno = -1;
@@ -177,7 +177,7 @@ gdm_get_cur_vt (void)
 {
 #if defined (__linux__)
 	struct vt_stat s;
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
 	int vtno;
 #endif
 	int fd;
@@ -203,7 +203,7 @@ gdm_get_cur_vt (void)
 	*/
 
 	return s.v_active;
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
 	if (ioctl (fd, VT_GETACTIVE, &vtno) == -1) {
 		VE_IGNORE_EINTR (close (fd));
 	--- daemon/gdm.c.orig	2005-07-10 09:24:31.000000000 +0000
+++ daemon/gdm.c
@@ -4249,7 +4249,7 @@ gdm_handle_user_message (GdmConnection *
 			return;
 		}
 
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
 		gdm_connection_printf (conn, "OK %d\n", gdm_get_cur_vt ());
 #else
 		gdm_connection_write (conn, "ERROR 8 Virtual terminals not supported\n");
@@ -4275,7 +4275,7 @@ gdm_handle_user_message (GdmConnection *
 			return;
 		}
 
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
 		gdm_change_vt (vt);
 		for (li = displays; li != NULL; li = li->next) {
 			GdmDisplay *disp = li->data;
	return -1;
Comment 1 Brian Cameron 2005-07-14 20:29:10 UTC
Fixed in CVS, thanks.