fbconsole.c revision 530
530N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 530N/A * Use is subject to license terms. 530N/A * Permission is hereby granted, free of charge, to any person obtaining a 530N/A * copy of this software and associated documentation files (the 530N/A * "Software"), to deal in the Software without restriction, including 530N/A * without limitation the rights to use, copy, modify, merge, publish, 530N/A * distribute, and/or sell copies of the Software, and to permit persons 530N/A * to whom the Software is furnished to do so, provided that the above 530N/A * copyright notice(s) and this permission notice appear in all copies of 530N/A * the Software and that both the above copyright notice(s) and this 530N/A * permission notice appear in supporting documentation. 530N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 530N/A * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 530N/A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 530N/A * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 530N/A * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 530N/A * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 530N/A * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 530N/A * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 530N/A * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 530N/A * Except as contained in this notice, the name of a copyright holder 530N/A * shall not be used in advertising or otherwise to promote the sale, use 530N/A * or other dealings in this Software without prior written authorization 530N/A * of the copyright holder. 530N/A * fbconsole - fallback console 530N/A * Default settings to use if they can't actually be obtained from a 530N/A * descriptor relevant to the application. 530N/A * XXX: These settings shouldn't be used unless absolutely necessary, since 530N/A * they're almost certain to get out of sync with the kernel's defaults 530N/A * (which is what they're intended to be). 530N/A /* control characters */ 530N/A * Returns a file descriptor which has had the console redirected to it 530N/A * This version (unused) opens a pipe and redirects the console to it. 530N/A * Opens a pty, copies tty settings into it from /dev/console, and redirects 530N/A * console output to it. Returns the master end of the pty. 530N/A * Propagate tty settings from the real console to the new console. 530N/A * If the erase character is zero, apply default settings to the new 530N/A * console. If the erase character is nonzero, leave most of the 530N/A * settings intact and apply default values only to the modes and to 530N/A * the EOF and EOL character. (Why apply defaults for EOF and EOL?) 530N/A /* redirect console output into the slave side */ 530N/A * Opens the console log file; returns a file descriptor 530N/A "fbconsole: couldn't open console log file '%s'\n",
path);
530N/A * Closes log file and exits 530N/A * The signal handler for SIGINT and SIGTERM. 530N/A * Reads a console message and writes it to the console log file 530N/A * Waits for input from the console message pipe or the xserver. 530N/A * On input from the console - logs it to the console log file. 530N/A * On any input (or EOF) from the xserver, exits 530N/A * Prints a usage message 530N/A "Couldn't open display connection %s\n",