git: vidcontrol: keep the failing ioctl's errno across revert()
Aaron LI
aly at crater.dragonflybsd.org
Mon Nov 2 07:58:37 PST 2026
commit 732cbb04c22e2859e89fb6c4ba7413566db8c531
Author: David Bidner <david at crap.solutions>
Date: Mon Nov 2 14:49:33 2026 +0100
vidcontrol: keep the failing ioctl's errno across revert()
revert() calls ioctls of its own, so if one of them fails it replaces the
error that made us revert in the first place and the message names the wrong
error. Save errno before calling revert().
Following FreeBSD commit 1b8c842e ("Fix some parsing and error handling
bugs"), which does this for the mode-set failure; done here for all
three calls in video_mode() (CONS_MODEINFO, CONS_SET, KDRASTER).
Bug: https://bugs.dragonflybsd.org/issues/2493
Summary of changes:
usr.sbin/vidcontrol/vidcontrol.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/732cbb04c22e2859e89fb6c4ba7413566db8c531
--
DragonFly BSD source repository
More information about the Commits
mailing list