From owner-cvs-usrsbin Sat Mar 8 07:01:14 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id HAA16641 for cvs-usrsbin-outgoing; Sat, 8 Mar 1997 07:01:14 -0800 (PST) Received: from relay-7.mail.demon.net (relay-7.mail.demon.net [194.217.242.9]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id GAA16517; Sat, 8 Mar 1997 06:59:32 -0800 (PST) Received: from awfulhak.demon.co.uk ([158.152.17.1]) by relay-6.mail.demon.net id aa0605573; 8 Mar 97 14:51 GMT Received: from awfulhak.demon.co.uk (localhost.lan.awfulhak.org [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id OAA01635; Sat, 8 Mar 1997 14:45:21 GMT Message-Id: <199703081445.OAA01635@awfulhak.demon.co.uk> X-Mailer: exmh version 1.6.9 8/22/96 To: =?iso-8859-1?Q?S=F8ren?= Schmidt cc: Brian Somers , CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-usrsbin@freefall.freebsd.org Subject: Re: cvs commit: src/usr.sbin/vidcontrol decode.h Makefile decode.c vidcontrol.1 vidcontrol.c In-reply-to: Your message of "Fri, 07 Mar 1997 07:33:08 +0100." <199703070633.HAA01429@ravenock.cybercity.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Date: Sat, 08 Mar 1997 14:45:21 +0000 From: Brian Somers Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by freefall.freebsd.org id GAA16519 Sender: owner-cvs-usrsbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > In reply to Brian Somers who wrote: > > brian 97/03/06 17:34:50 > > > > Modified: usr.sbin/vidcontrol Makefile decode.c vidcontrol.1 > > vidcontrol.c > > Added: usr.sbin/vidcontrol decode.h > > Log: > > Add a -s option for setting the current vty. This should make > > life easier if a PS/2 mouse locks up the keyboard (frequent-ish, > > but not repeatable). > > Tidy up code (a bit) and make it -Wall > > > > Is this a 2.2 candidate ? (although it doesn't -Wall in 2.2 because > > of the lack of sys/sysproto.h > > What's the idea of this ?? vidcontrol uses stdin which is the > current vty :) > Also I'd like you to have me review patches to code under my wings. > I'll look it over (later) and see whats actually going on. > Sorry, I didn't mean to stomp on anyones toes. This was IMO the best place for this, and I think it's required. The description, unfortunately leaves a bit to be desired. The change essentially allows the user to change the active vty via a call to ioctl(0,VT_ACTIVATE,"1..12"). You still have to either be on a vty or redirect stdin from one (ie, be root). The reason this is necessary is because a few people have complained on usenet that they've had lock-ups on machines with PS/2 mice configured. They have ended up rebooting their machines from a telnet/serial connection. I noticed this some time ago and mentioned it (on usenet), only to be told that I had a bad keyboard. It was happening on 3 or 4 machines, so I decided to "take a look". I couldn't find the problem - mostly because it's a non-reproducable problem and is very intermittent, but I found that switching vtys would solve it. I wrote a program called "setcon" which I put on ftp.freebsd.org/~brian and my own web page. When some people recently complained about the problem, I figured that something more solid should be done..... Anyway, take a look at the changes. They aren't too obtuse and don't affect any of the rest of the code. When I -Wall'd the code, I found that there were several calls to close(FILE*) - probably as well that these have been fixed. -- Brian , Don't _EVER_ lose your sense of humour....