Fix gstat's interactive f and q commands
authorasomers <asomers@FreeBSD.org>
Thu, 23 Jun 2016 23:13:14 +0000 (23:13 +0000)
committerasomers <asomers@FreeBSD.org>
Thu, 23 Jun 2016 23:13:14 +0000 (23:13 +0000)
commit226be952e76a861478ac965b82e666d82560ace8
tree04bf923003d8c9f278f4520b41c979e0fbaee3bd
parentf3a7d6a3f15e3b2146dca4f01ba9806d1c94ff53
Fix gstat's interactive f and q commands

curses and libedit don't play well together. After last year's libedit
upgrade in head, they play even less well together. This change resets some
curses settings after they get screwed up by libedit calls. Without it,
gstat's interactive commands require an extra "enter", screw up the terminal
on exit, and screw up the display if the user enters an invalid filter
string.

PR: 204852
Submitted by: Keith White
Reviewed by: pfg
Approved by: re (gjb)
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6934
usr.sbin/gstat/gstat.c