[PATCH xserver 5/8] bsd: Some clean up
Alexandr Shadchin
alexandr.shadchin at gmail.com
Thu Sep 15 10:20:25 PDT 2011
OpenBSD and NetBSD does not support syscons
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
---
hw/xfree86/os-support/bsd/bsd_init.c | 4 ----
hw/xfree86/os-support/xf86_OSlib.h | 20 ++++++++------------
2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index 1825672..a0caee3 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -446,11 +446,7 @@ xf86OpenSyscons()
}
close(fd);
-#ifndef __OpenBSD__
sprintf(vtname, "/dev/ttyv%01x", xf86Info.vtno - 1);
-#else
- sprintf(vtname, "/dev/ttyC%01x", xf86Info.vtno - 1);
-#endif
if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
{
FatalError("xf86OpenSyscons: Cannot open %s (%s)",
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 24c92fb..cf92821 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -266,19 +266,15 @@
# else /* __bsdi__ */
# ifdef SYSCONS_SUPPORT
# define COMPAT_SYSCONS
-# if defined(__NetBSD__) || defined(__OpenBSD__)
-# include <machine/console.h>
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+# if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
+# include <sys/consio.h>
+# include <sys/kbio.h>
+# else
+# include <machine/console.h>
+# endif /* FreeBSD 4.1 RELEASE or lator */
# else
-# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-# if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
-# include <sys/consio.h>
-# include <sys/kbio.h>
-# else
-# include <machine/console.h>
-# endif /* FreeBSD 4.1 RELEASE or lator */
-# else
-# include <sys/console.h>
-# endif
+# include <sys/console.h>
# endif
# endif /* SYSCONS_SUPPORT */
# if defined(PCVT_SUPPORT)
--
1.7.6
More information about the xorg-devel
mailing list