After some confusion and miscommunication between myself and Aaron
Zang, it became clear how to correctly write the fbconsole test that
GDM 2.20 and 2.27 should use to see if VT is enabled.  After referring
to the "man vt" manpage, which says:

       VT_ENABLED

           Queries to determine if VT functionality is available on
           the  system. The argument is a pointer to an integer. If
           VT functionality is available, the integer is 1,  other-
           wise it is 0.

I rewrote the 2.26 and SVN head fbconsole patches so they conform to
the above interface definition.

The gdm-11-fbconsole.diff patch is for GDM 2.20 (2.26 branch)
The gdm-08-fbconsole.diff patch is for GDM 2.27 (SVN head)

The main difference is that the last revision of the patch was assuming
that if the ioctl (fd, VT_ENABLED, &vtstat) call returned 0 that VT
was enabled.  However, as the manpage says, the vtstat variable is
an integer and returns 1 if enabled, 0 if not.  The new patches
reflect this.  So now the code looks like this:

+               int vtstat;
[...]
+                       if (ioctl (fd, VT_ENABLED, &vtstat) == 0) {
+                               if (vtstat == 1) {

After testing, this works much better.  Thanks, and apologies for the
noise.

Brian

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdm-08-fbconsole.diff
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20090905/eb1d1abe/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdm-11-fbconsole.diff
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20090905/eb1d1abe/attachment-0001.ksh>

Reply via email to