[PATCH] linux: Fix error message when /dev/tty0 fails to open
Cyril Brulebois
kibi at debian.org
Sat Jan 14 00:17:25 PST 2012
Chad Versace <chad.versace at linux.intel.com> (13/01/2012):
> When attempting to open the console device during initialization, X first
> tries to open /dev/tty0 in write-only mode, and if that fails it attempts
> to open /dev/vc/0. If both attempts fail, the error message below is
> logged. The message is incorrect because the errno is that resulting from
> the failure to open /dev/vc/0.
>
> xf86OpenConsole: Cannot open /dev/tty0 ({strerror(errno)})
>
> On a machine in which /dev/tty0 does exist but /dev/vc/0 does not, such as
> my machine, the log misleadingly says:
>
> Fatal server error:
> [ 3167.976] xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
>
> This patch fixes the log to report the correct errno for each device. The
> result is this log snippet:
>
> [ 3755.177] (WW) xf86OpenConsole: Failed to open /dev/tty0 for writing (Permission denied)
> [ 3755.177] (WW) xf86OpenConsole: Failed to open /dev/vc/0 for writing (No such file or directory)
> [ 3755.177]
> Fatal server error:
> [ 3755.177] xf86OpenConsole: Failed to open console device
Looks like a nice improvement.
Acked-by: Cyril Brulebois <kibi at debian.org>
Mraw,
KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120114/6facabc2/attachment.pgp>
More information about the xorg-devel
mailing list