From owner-freebsd-stable Sat May 13 13: 0:30 2000 Delivered-To: freebsd-stable@freebsd.org Received: from frolkin.demon.co.uk (frolkin.demon.co.uk [194.222.100.41]) by hub.freebsd.org (Postfix) with ESMTP id AE0AF37BA06 for ; Sat, 13 May 2000 13:00:04 -0700 (PDT) (envelope-from sasha@frolkin.demon.co.uk) Received: from sasha by frolkin.demon.co.uk with local (Exim 3.12 #1) id 12qi4u-0000Hx-00; Sat, 13 May 2000 21:00:00 +0100 Date: Sat, 13 May 2000 21:00:00 +0100 From: Alexander Frolkin To: Tim Vanderhoek Cc: Alex Kosorukoff , freebsd-stable@FreeBSD.org Subject: Re: Console ioctl in FBSD Message-ID: <20000513210000.A546@gamma> Reply-To: Alexander Frolkin References: <391CD124.C8EAAEBD@3form.com> <20000513063110.A8456@mad> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <20000513063110.A8456@mad>; from Tim Vanderhoek on Sat, May 13, 2000 at 06:31:10AM -0400 X-Operating-System: Linux 2.2.15 X-GPG-Key-Fingerprint: 6C84 3EB2 550E E581 62FA BB0C D510 B042 FD5C E7A7 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 to > > . Is it a bug or feature of FBSD? How to make it work? > > > > The code is following: > > > > #include > > #include > > #include > > #include > > #include > > > > 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