Debian Bug report logs - #456437
manpages: vcsa(4) documentation fix and update

version graph

Package: manpages; Maintainer for manpages is Martin Schulze <joey@debian.org>; Source for manpages is src:manpages.

Reported by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Date: Sat, 15 Dec 2007 18:09:02 UTC

Severity: normal

Tags: patch

Found in version manpages/2.67-1

Fixed in version manpages/2.74-1

Done: Martin Schulze <joey@infodrom.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#456437; Package manpages. Full text and rfc822 format available.

Acknowledgement sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: manpages: vcsa(4) documentation fix and update
Date: Sat, 15 Dec 2007 18:06:11 +0000
[Message part 1 (text/plain, inline)]
Package: manpages
Version: 2.67-1
Severity: normal
Tags: patch

Hello,

Here is a documentation fix for vcsa(4): attribute/text characters are
in the host endianness.  Also, document the VT_GETHIFONTMASK ioctl.

Samuel

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.23
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

-- no debconf information

-- 
Samuel
* D a decide de peter un cable dans son rapport de pfp
<c> et il a bien raison ;-)
<c> tu vas dire quoi ?
<D> j'ai mis les paroles de "le coq est mort" en en-tete
 -+- #ens-mim et la peufeupeu -+-
[patch (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#456437; Package manpages. Full text and rfc822 format available.

Acknowledgement sent to Michael Kerrisk <mtk.manpages@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #10 received at 456437@bugs.debian.org (full text, mbox):

From: Michael Kerrisk <mtk.manpages@googlemail.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>, 456437@bugs.debian.org
Subject: Re: Bug#456437: manpages: vcsa(4) documentation fix and update
Date: Mon, 17 Dec 2007 15:56:00 +0100
Samuel Thibault wrote:
> Package: manpages
> Version: 2.67-1
> Severity: normal
> Tags: patch
> 
> Hello,
> 
> Here is a documentation fix for vcsa(4): attribute/text characters are
> in the host endianness.  Also, document the VT_GETHIFONTMASK ioctl.

I edited and your patch somewhat, and fixed some other places on the page
that are affected by these changes, and applied for upstream 2.74.

Does the following look okay?

Cheers,

Michael

===================================================================
--- vcs.4       (revision 2338)
+++ vcs.4       (working copy)
@@ -22,8 +22,10 @@
 .\" USA.
 .\"
 .\" Modified, Sun Feb 26 15:08:05 1995, faith@cs.unc.edu
+.\" 2007-12-17, Samuel Thibault <samuel.thibault@ens-lyon.org>:
+.\"     document the VT_GETHIFONTMASK ioctl
 .\" "
-.TH VCS 4 1995-02-19 "Linux" "Linux Programmer's Manual"
+.TH VCS 4 2007-12-17 "Linux" "Linux Programmer's Manual"
 .SH NAME
 vcs, vcsa \- virtual console memory
 .SH DESCRIPTION
@@ -36,13 +38,26 @@
 terminals, they have major number 7 and minor number 1 to 63, usually
 mode 0644 and owner root.tty.
 \fI/dev/vcsa[0\-63]\fP are the same, but
-including attributes, and prefixed with four bytes giving the screen
+using unsigned shorts (in host byte order) that include attributes,
+and prefixed with four bytes giving the screen
 dimensions and cursor position: \fIlines\fP, \fIcolumns\fP, \fIx\fP, \fIy\fP.
 (\fIx\fP = \fIy\fP = 0 at the top left corner of the screen.)
+
+When a 512-character font is loaded,
+the 9th bit position can be fetched by applying the
+.BR ioctl (2)
+\fBVT_GETHIFONTMASK\fP operation
+(available in Linux kernels 2.6.18 and above)
+on \fI/dev/tty[1\-63]\fP;
+the value is returned in the
+.I "unsigned short"
+pointed to by the third
+.BR ioctl (2)
+argument.
 .PP
-These replace the screendump
-.IR ioctl s
-of
+These devices replace the screendump
+.BR ioctl (2)
+operations of
 .BR console (4),
 so the system
 administrator can control access using file system permissions.
@@ -56,10 +71,6 @@
     done
     chown root:tty /dev/vcs*
 .fi
-
-No
-.BR ioctl (2)
-requests are supported.
 .SH FILES
 /dev/vcs[0\-63]
 .br
@@ -87,15 +98,30 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/vt.h>

 int
 main(void)
 {
     int fd;
     char *device = "/dev/vcsa2";
+    char *console = "/dev/tty2";
     struct {unsigned char lines, cols, x, y;} scrn;
-    char ch, attrib;
+    unsigned short s;
+    unsigned short mask;
+    unsigned char ch, attrib;

+    fd = open(console, O_RDWR);
+    if (fd < 0) {
+        perror(console);
+        exit(EXIT_FAILURE);
+    }
+    if (ioctl(fd, VT_GETHIFONTMASK, &mask) < 0) {
+        perror("VT_GETHIFONTMASK");
+        exit(EXIT_FAILURE);
+    }
+    (void) close(fd);
     fd = open(device, O_RDWR);
     if (fd < 0) {
         perror(device);
@@ -103,8 +129,11 @@
     }
     (void) read(fd, &scrn, 4);
     (void) lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0);
-    (void) read(fd, &ch, 1);
-    (void) read(fd, &attrib, 1);
+    (void) read(fd, &s, 2);
+    ch = s & 0xff;
+    if (attrib & mask)
+        ch |= 0x100;
+    attrib = ((s & ~mask) >> 8);
     printf("ch='%c' attrib=0x%02x\\n", ch, attrib);
     attrib ^= 0x10;
     (void) lseek(fd, \-1, 1);





Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#456437; Package manpages. Full text and rfc822 format available.

Acknowledgement sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #15 received at 456437@bugs.debian.org (full text, mbox):

From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: 456437@bugs.debian.org
Subject: Re: Bug#456437: manpages: vcsa(4) documentation fix and update
Date: Mon, 17 Dec 2007 15:05:08 +0000
Hi,

That looks fine, thanks!

Michael Kerrisk, le Mon 17 Dec 2007 15:56:00 +0100, a écrit :
> @@ -56,10 +71,6 @@
>      done
>      chown root:tty /dev/vcs*
>  .fi
> -
> -No
> -.BR ioctl (2)
> -requests are supported.
>  .SH FILES
>  /dev/vcs[0\-63]
>  .br

Mmm, I think this is still true. There is no ioctl defined in
drivers/char/vc_screen. c . But if you dropped it just because it's not
very useful to mention it, then fine.

Samuel




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#456437; Package manpages. Full text and rfc822 format available.

Acknowledgement sent to "Michael Kerrisk" <mtk.manpages@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #20 received at 456437@bugs.debian.org (full text, mbox):

From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Samuel Thibault" <samuel.thibault@ens-lyon.org>
Cc: 456437@bugs.debian.org
Subject: Re: Bug#456437: manpages: vcsa(4) documentation fix and update
Date: Mon, 17 Dec 2007 16:15:47 +0100
On 12/17/07, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> Hi,
>
> That looks fine, thanks!
>
> Michael Kerrisk, le Mon 17 Dec 2007 15:56:00 +0100, a écrit :
> > @@ -56,10 +71,6 @@
> >      done
> >      chown root:tty /dev/vcs*
> >  .fi
> > -
> > -No
> > -.BR ioctl (2)
> > -requests are supported.
> >  .SH FILES
> >  /dev/vcs[0\-63]
> >  .br
>
> Mmm, I think this is still true. There is no ioctl defined in
> drivers/char/vc_screen. c . But if you dropped it just because it's not
> very useful to mention it, then fine.

Hmmm -- have I made a mistake then.  I dropped that sentence because I
mistakenly thought that the addition of VT_GETHIFONTMASK made the
sentnce no longer true.  But of course it is still true because that
ioctl() does not apply to /dev/vcs[a]*, right?

Cheers,

Michael

-- 
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug?  Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#456437; Package manpages. Full text and rfc822 format available.

Acknowledgement sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #25 received at 456437@bugs.debian.org (full text, mbox):

From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: 456437@bugs.debian.org
Subject: Re: Bug#456437: manpages: vcsa(4) documentation fix and update
Date: Mon, 17 Dec 2007 15:20:26 +0000
Michael Kerrisk, le Mon 17 Dec 2007 16:15:47 +0100, a écrit :
> On 12/17/07, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> > Michael Kerrisk, le Mon 17 Dec 2007 15:56:00 +0100, a écrit :
> > > @@ -56,10 +71,6 @@
> > >      done
> > >      chown root:tty /dev/vcs*
> > >  .fi
> > > -
> > > -No
> > > -.BR ioctl (2)
> > > -requests are supported.
> > >  .SH FILES
> > >  /dev/vcs[0\-63]
> > >  .br
> >
> > Mmm, I think this is still true. There is no ioctl defined in
> > drivers/char/vc_screen. c . But if you dropped it just because it's not
> > very useful to mention it, then fine.
> 
> Hmmm -- have I made a mistake then.  I dropped that sentence because I
> mistakenly thought that the addition of VT_GETHIFONTMASK made the
> sentnce no longer true.  But of course it is still true because that
> ioctl() does not apply to /dev/vcs[a]*, right?

Yes.

Samuel




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#456437; Package manpages. Full text and rfc822 format available.

Acknowledgement sent to "Michael Kerrisk" <mtk.manpages@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #30 received at 456437@bugs.debian.org (full text, mbox):

From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Samuel Thibault" <samuel.thibault@ens-lyon.org>
Cc: 456437@bugs.debian.org
Subject: Re: Bug#456437: manpages: vcsa(4) documentation fix and update
Date: Mon, 17 Dec 2007 17:20:24 +0100
On 12/17/07, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> Michael Kerrisk, le Mon 17 Dec 2007 16:15:47 +0100, a écrit :
> > On 12/17/07, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> > > Michael Kerrisk, le Mon 17 Dec 2007 15:56:00 +0100, a écrit :
> > > > @@ -56,10 +71,6 @@
> > > >      done
> > > >      chown root:tty /dev/vcs*
> > > >  .fi
> > > > -
> > > > -No
> > > > -.BR ioctl (2)
> > > > -requests are supported.
> > > >  .SH FILES
> > > >  /dev/vcs[0\-63]
> > > >  .br
> > >
> > > Mmm, I think this is still true. There is no ioctl defined in
> > > drivers/char/vc_screen. c . But if you dropped it just because it's not
> > > very useful to mention it, then fine.
> >
> > Hmmm -- have I made a mistake then.  I dropped that sentence because I
> > mistakenly thought that the addition of VT_GETHIFONTMASK made the
> > sentnce no longer true.  But of course it is still true because that
> > ioctl() does not apply to /dev/vcs[a]*, right?
>
> Yes.

Okay, thanks. I've restored that sentence.

Cheers,

Michael

-- 
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug?  Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html




Reply sent to Martin Schulze <joey@infodrom.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #35 received at 456437-close@bugs.debian.org (full text, mbox):

From: Martin Schulze <joey@infodrom.org>
To: 456437-close@bugs.debian.org
Subject: Bug#456437: fixed in manpages 2.74-1
Date: Thu, 24 Jan 2008 08:47:15 +0000
Source: manpages
Source-Version: 2.74-1

We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive:

manpages-dev_2.74-1_all.deb
  to pool/main/m/manpages/manpages-dev_2.74-1_all.deb
manpages_2.74-1.diff.gz
  to pool/main/m/manpages/manpages_2.74-1.diff.gz
manpages_2.74-1.dsc
  to pool/main/m/manpages/manpages_2.74-1.dsc
manpages_2.74-1_all.deb
  to pool/main/m/manpages/manpages_2.74-1_all.deb
manpages_2.74.orig.tar.gz
  to pool/main/m/manpages/manpages_2.74.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 456437@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Schulze <joey@infodrom.org> (supplier of updated manpages package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 24 Jan 2008 09:15:40 +0100
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 2.74-1
Distribution: unstable
Urgency: low
Maintainer: Martin Schulze <joey@debian.org>
Changed-By: Martin Schulze <joey@infodrom.org>
Description: 
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 456437
Changes: 
 manpages (2.74-1) unstable; urgency=low
 .
   * New upstream version
     . Improvements to vcs(4) (closes: Bug#456437)
Files: 
 df4ced3515ec7cecbf7b83efe32b94e9 584 doc important manpages_2.74-1.dsc
 427df9e8a3a6943f3732481e32016985 1273003 doc important manpages_2.74.orig.tar.gz
 71efe6b95c7827e635186cf2ece34e9e 53881 doc important manpages_2.74-1.diff.gz
 4b01c03a493f1aed3c051bcb0fe8aafb 546130 doc important manpages_2.74-1_all.deb
 a0d4fd6f147e949a98938e6c26d0cef5 1372638 doc optional manpages-dev_2.74-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHmEunW5ql+IAeqTIRAgzJAJ9l+tE7SG+/iVxfb7pMp03P57EtzwCfRVvD
ak78zCC4oqbp5F4GsL6nxtg=
=Cu5V
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 22 Feb 2008 07:30:51 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 00:43:03 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.