Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 May 2000 21:00:00 +0100
From:      Alexander Frolkin <alexander@frolkin.demon.co.uk>
To:        Tim Vanderhoek <vanderh@ecf.utoronto.ca>
Cc:        Alex Kosorukoff <alex@3form.com>, freebsd-stable@FreeBSD.org
Subject:   Re: Console ioctl in FBSD
Message-ID:  <20000513210000.A546@gamma>
In-Reply-To: <20000513063110.A8456@mad>; from Tim Vanderhoek on Sat, May 13, 2000 at 06:31:10AM -0400
References:  <391CD124.C8EAAEBD@3form.com> <20000513063110.A8456@mad>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 13, 2000 at 06:31:10AM -0400, Tim Vanderhoek wrote:
> On Fri, May 12, 2000 at 10:51:00PM -0500, Alex Kosorukoff wrote:
> >
> > I try to control keyboard LEDs with ioctl calls but they don't work.
> > Despite ioctl returns success, LEDs will not turn on/off. The same code
> 
> FWIW, it worked for me on ~3.4-R.

It also worked for me on 4.0-STABLE built on 29/04.


Alexander.

> 
> > works fine on Linux (with a change of <machine/console.h> to
> > <linux/kd.h>. Is it a bug or feature of FBSD? How to make it work?
> > 
> > The code is following:
> > 
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <fcntl.h>
> > #include <sys/ioctl.h>
> > #include <machine/console.h>
> > 
> > main(int argc, char *argv[]) {
> >   char leds;
> > 
> >   if ( ioctl( 0, KDGETLED, &leds ) ) {
> >       fprintf(stderr,"Can't get leds\n");
> >       exit(1);
> >   }
> >   if ( ioctl( 0, KDSETLED, leds | LED_CAP ) ) {
> >       fprintf(stderr,"Can't set leds\n");
> >       exit(1);
> >   }
> >   printf("Caps lock should glow\n");
> >   getchar();
> >   ioctl( 0, KDSETLED, leds );
> >   exit(0);
> > }
> > 
> > Sincerely,
> > Alex
> > 
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-stable" in the body of the message
> 
> 
> -- 
> Signature withheld by request of author.
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message

-- 
... Why doesn't DOS ever say "EXCELLENT command or filename!" ...
||....// .AAAAAAAFFFFF/ //..WWW.site:.http://www.frolkin.demon.co.uk/.......||
||...// AAA/  AFF/     //...FTP.site:.ftp://frolkin.demon.co.uk/............||
||..// AAAAAAAAFFFFF/ //......E-Mail:.mailto:alexander@frolkin.demon.co.uk..||
||.// AAA/  AFF/     //....Real.name:.Alexander.Frolkin.....................||


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000513210000.A546>