Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: grisxa on April 26, 2010, 05:37:23 AM

Title: Get active console number (fgconsole)
Post by: grisxa on April 26, 2010, 05:37:23 AM
Hello!

I'm looking for fgconsole program that gives active (foreground) console number.
In kbd-1.15 package (Fedora) it calls "ioctl(fd, VT_GETSTATE, &vtstat)" and returns "vtstat.v_active".

Is there such program available for TinyCore?

If not, I've made a patch for busybox-1.14.3 that implements this feature.
Title: Re: Get active console number (fgconsole)
Post by: curaga on April 26, 2010, 08:54:01 AM
None that I know of. Please send the modifications upstream in addition to here, though.
Title: Re: Get active console number (fgconsole)
Post by: grisxa on April 26, 2010, 11:09:52 AM
Please send the modifications upstream in addition to here, though.

Ok, I've filed bug #1639 (https://bugs.busybox.net/show_bug.cgi?id=1639) (patch updated to 1.16.1).
Title: Re: Get active console number (fgconsole)
Post by: curaga on May 01, 2010, 04:48:31 AM
Your patch for 1.16.1 broke the busybox help; attached a patch for that.

The file was supposed to be alpha sorted, and fgconsole was originally right after chvt :)
Title: Re: Get active console number (fgconsole)
Post by: grisxa on May 04, 2010, 11:29:39 AM
Your patch for 1.16.1 broke the busybox help; attached a patch for that.

The file was supposed to be alpha sorted, and fgconsole was originally right after chvt :)
Sorry, I didn't know about that  :)