Page MenuHomeFreeBSD

vt(4): Allow to restore default font
ClosedPublic

Authored by dumbbell on Oct 20 2014, 3:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 1:59 PM
Unknown Object (File)
Oct 26 2024, 2:34 AM
Unknown Object (File)
Oct 25 2024, 4:02 AM
Unknown Object (File)
Oct 17 2024, 7:54 PM
Unknown Object (File)
Oct 12 2024, 10:34 AM
Unknown Object (File)
Oct 12 2024, 10:34 AM
Unknown Object (File)
Oct 12 2024, 10:21 AM
Unknown Object (File)
Oct 6 2024, 7:49 PM
Subscribers
None

Details

Reviewers
ray
emaste
Summary

Marcin Cieslak posted a patch on freebsd-current@ to modify vidcontrol(1) to allow the user to restore the default font. The proposed usage is to change the "-f" flag to set the default font if no argument is specified:

vidcontrol -f < /dev/ttyv0

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

dumbbell retitled this revision from to vt(4): Allow to restore default font.
dumbbell updated this object.
dumbbell edited the test plan for this revision. (Show Details)
dumbbell added reviewers: ray, emaste.
ray edited edge metadata.

Looks fine.
But I did not able to test it :) (at least now)

This revision is now accepted and ready to land.Oct 21 2014, 12:43 PM

I tested it and it works.

I'm more interested in the addition of the PIO_VDFTFONT ioctl: can we add new ioctls freely? Or is there some kind of regulation for new console ioctls? I don't want this new entry to create incompatibilities.

There is several ways:

  1. You can change ABI, but not merge that changes to older releases.
  2. Or keep ABI, and merge whatever you need

:-D

In that case you are adding new one, which have unique id. so old code will work.
So, you can merge it to other branches. (But formally it is ABI change :) )

Maybe pass zeroed struct with PIO_VFONT?

Thanks!
WBW

In D971#7, @ray wrote:

There is several ways:

  1. You can change ABI, but not merge that changes to older releases.
  2. Or keep ABI, and merge whatever you need

I understand that, but what I feared is that those ioctls might be standardized among several operating systems. But now that I look more closely, they are specific to vt(4), so there's no worry to have here. Sorry for the noise :-)

Maybe pass zeroed struct with PIO_VFONT?

I'll commit the original change, to not abuse PIO_VFONT.

sys/sys/consio.h
242

At the risk of bikeshedding, I had trouble parsing VDFTFONT. What about PIO_VFONT_DFLT?

Also could we add a comment to the line e.g. /* Reset to default font. */

In D971#9, @emaste wrote:

At the risk of bikeshedding, I had trouble parsing VDFTFONT. What about PIO_VFONT_DFLT?

I agree and had the same trouble. I even suggest PIO_VFONT_DEFAULT :-)

Also could we add a comment to the line e.g. /* Reset to default font. */

Ok, it'll be fixed in the commit.