Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / x68k / usr.bin / tvctrl / tvctrl.c
blobc4dca9fcc0b149a356c0d5404166a65bc99c8fc5
1 /* $NetBSD: tvctrl.c,v 1.6.2.3 2004/09/21 13:24:21 skrll Exp $ */
3 #include <sys/cdefs.h>
4 __RCSID("$NetBSD: tvctrl.c,v 1.6.2.3 2004/09/21 13:24:21 skrll Exp $");
6 #include <sys/types.h>
7 #include <sys/ioctl.h>
8 #include <machine/iteioctl.h>
9 #include <err.h>
10 #include <stdio.h>
11 #include <stdlib.h>
13 int main(int, char *[]);
15 int
16 main(int argc, char *argv[])
18 unsigned long num;
19 unsigned char ctl;
20 char *ep;
22 if (argc < 2) {
23 fprintf(stderr, "usage: %s control_number [...]\n", argv[0]);
24 return 1;
26 while (argv++, --argc != 0) {
27 num = strtoul(argv[0], &ep, 10);
28 if (num > 255 || *ep != '\0')
29 errx(1, "illegal number -- %s", argv[0]);
31 ctl = num;
32 if (ioctl(0, ITETVCTRL, &ctl))
33 err(1, "ioctl(ITETVCTRL)");
36 return 0;