From: teodor Date: Tue, 1 Dec 2009 17:43:45 +0000 (+0000) Subject: Fix ioctl(KDSETLED) X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=89917dca7298f5124c32483ee1e965a5b6db40fd;p=blinker.git Fix ioctl(KDSETLED) --- diff --git a/blinker.c b/blinker.c index 57ec13d..64f27a4 100644 --- a/blinker.c +++ b/blinker.c @@ -111,7 +111,7 @@ execKbd(struct Blinker * blinker, int RxAction, int TxAction) { else flag &= ~blinker->TxLed; - if (ioctl(0, KDSETLED, &flag) == -1) + if (ioctl(0, KDSETLED, flag) == -1) tlog(TL_WARN,"unable to set NumLock led: %s", strerror(errno)); @@ -182,8 +182,7 @@ main(int argc, char *argv[]) { memset(&blinker, 0, sizeof(blinker)); - if (ioctl(0, KDGKBINFO, &info) == 0) - { + if (ioctl(0, KDGKBINFO, &info) == 0) { blinker.TxLed = LED_CAP; blinker.RxLed = LED_NUM; blinker.exec = execKbd;