WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Get active console number (fgconsole)  (Read 3318 times)

Offline grisxa

  • Newbie
  • *
  • Posts: 27
Get active console number (fgconsole)
« 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Get active console number (fgconsole)
« Reply #1 on: April 26, 2010, 08:54:01 AM »
None that I know of. Please send the modifications upstream in addition to here, though.
The only barriers that can stop you are the ones you create yourself.

Offline grisxa

  • Newbie
  • *
  • Posts: 27
Re: Get active console number (fgconsole)
« Reply #2 on: April 26, 2010, 11:09:52 AM »
Please send the modifications upstream in addition to here, though.

Ok, I've filed bug #1639 (patch updated to 1.16.1).

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Get active console number (fgconsole)
« Reply #3 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 :)
The only barriers that can stop you are the ones you create yourself.

Offline grisxa

  • Newbie
  • *
  • Posts: 27
Re: Get active console number (fgconsole)
« Reply #4 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  :)