[PATCH xserver 4/8] bsd: Remove dead code
Alexandr Shadchin
alexandr.shadchin at gmail.com
Thu Sep 15 10:20:24 PDT 2011
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
---
hw/xfree86/os-support/bsd/bsd_init.c | 23 -----------------------
1 files changed, 0 insertions(+), 23 deletions(-)
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index 84c6b3d..1825672 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -211,9 +211,6 @@ xf86OpenConsole()
"%s: No console driver found\n\tSupported drivers: %s\n\t%s",
"xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
}
-#if 0 /* stdin is already closed in OsInit() */
- fclose(stdin);
-#endif
xf86Info.consoleFd = fd;
switch (xf86Info.consType)
@@ -372,7 +369,6 @@ xf86OpenSyscons()
int fd = -1;
vtmode_t vtmode;
char vtname[12];
- struct stat status;
long syscons_version;
MessageType from;
@@ -425,20 +421,11 @@ xf86OpenSyscons()
{
/*
* All VTs are in use. If initialVT was found, use it.
- * Otherwise, if stdin is a VT, use that one.
- * XXX stdin is already closed, so this won't work.
*/
if (initialVT != -1)
{
xf86Info.vtno = initialVT;
}
- else if ((fstat(0, &status) >= 0)
- && S_ISCHR(status.st_mode)
- && (ioctl(0, VT_GETMODE, &vtmode) >= 0))
- {
- /* stdin is a VT */
- xf86Info.vtno = minor(status.st_rdev) + 1;
- }
else
{
if (syscons_version >= 0x100)
@@ -508,7 +495,6 @@ xf86OpenPcvt()
int fd = -1;
vtmode_t vtmode;
char vtname[12], *vtprefix;
- struct stat status;
struct pcvtid pcvt_version;
#ifndef __OpenBSD__
@@ -554,20 +540,11 @@ xf86OpenPcvt()
{
/*
* All VTs are in use. If initialVT was found, use it.
- * Otherwise, if stdin is a VT, use that one.
- * XXX stdin is already closed, so this won't work.
*/
if (initialVT != -1)
{
xf86Info.vtno = initialVT;
}
- else if ((fstat(0, &status) >= 0)
- && S_ISCHR(status.st_mode)
- && (ioctl(0, VT_GETMODE, &vtmode) >= 0))
- {
- /* stdin is a VT */
- xf86Info.vtno = minor(status.st_rdev) + 1;
- }
else
{
FatalError("%s: Cannot find a free VT",
--
1.7.6
More information about the xorg-devel
mailing list