From owner-freebsd-stable Sat May 13 4: 1:21 2000 Delivered-To: freebsd-stable@freebsd.org Received: from smtp13.bellglobal.com (smtp13.bellglobal.com [204.101.251.52]) by hub.freebsd.org (Postfix) with ESMTP id 19BEA37BCE1 for ; Sat, 13 May 2000 04:01:09 -0700 (PDT) (envelope-from hoek@FreeBSD.org) Received: from localhost.nowhere (ppp18358.on.bellglobal.com [206.172.130.38]) by smtp13.bellglobal.com (8.8.5/8.8.5) with ESMTP id HAA09300; Sat, 13 May 2000 07:04:45 -0400 (EDT) Received: (from tim@localhost) by localhost.nowhere (8.9.3/8.9.1) id GAA08744; Sat, 13 May 2000 06:31:10 -0400 (EDT) (envelope-from tim) Date: Sat, 13 May 2000 06:31:10 -0400 From: Tim Vanderhoek To: Alex Kosorukoff Cc: freebsd-stable@FreeBSD.org Subject: Re: Console ioctl in FBSD Message-ID: <20000513063110.A8456@mad> References: <391CD124.C8EAAEBD@3form.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <391CD124.C8EAAEBD@3form.com>; from Alex Kosorukoff on Fri, May 12, 2000 at 10:51:00PM -0500 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. > 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