chiark
/
gitweb
/
~ijackson
/
trains.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
hostside: hidrawconv-joytechneos: fixes and improvements to pseudo-descriptors
[trains.git]
/
hostside
/
kdled-ioctl.c
1
/**/
2
3
#include <stdio.h>
4
#include <stdint.h>
5
#include <unistd.h>
6
#include <stdlib.h>
7
#include <string.h>
8
#include <sys/ioctl.h>
9
#include <linux/kd.h>
10
11
int main(int argc, char **argv) {
12
uint8_t l;
13
int r;
14
r= ioctl(0, KDGETLED, &l);
15
if (r<0) { perror("KDGETLED"); exit(-1); }
16
printf("%02x\n", l);
17
return 0;
18
}