Page MenuHomeFreeBSD

vt(4): Allow to restore default font
ClosedPublic

Authored by dumbbell on Oct 20 2014, 3:45 PM.

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
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

dumbbell updated this revision to Diff 2054.Oct 20 2014, 3:45 PM
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 accepted this revision.Oct 21 2014, 12:43 PM
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.

ray added a comment.Oct 21 2014, 9:37 PM

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.

emaste added inline comments.Oct 22 2014, 1:13 AM
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.

dumbbell closed this revision.Oct 23 2014, 12:53 PM

Committed in r273544.