From 89917dca7298f5124c32483ee1e965a5b6db40fd Mon Sep 17 00:00:00 2001 From: teodor Date: Tue, 1 Dec 2009 17:43:45 +0000 Subject: [PATCH] Fix ioctl(KDSETLED) --- blinker.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; -- 2.46.1