From owner-freebsd-stable Fri May 12 20:50: 5 2000 Delivered-To: freebsd-stable@freebsd.org Received: from staff2.cso.uiuc.edu (staff2.cso.uiuc.edu [128.174.5.53]) by hub.freebsd.org (Postfix) with ESMTP id 81D7237B5F3 for ; Fri, 12 May 2000 20:49:59 -0700 (PDT) (envelope-from alex@3form.com) Received: from 3form.com (castle-129.slip.uiuc.edu [130.126.28.129]) by staff2.cso.uiuc.edu (8.9.3/8.9.3) with ESMTP id WAA23966 for ; Fri, 12 May 2000 22:49:56 -0500 (CDT) Message-ID: <391CD124.C8EAAEBD@3form.com> Date: Fri, 12 May 2000 22:51:00 -0500 From: Alex Kosorukoff X-Mailer: Mozilla 4.7 [ru] (X11; I; FreeBSD 3.4-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: Console ioctl in FBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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