Errata

Page 45

the program listed is nonsense - its been pasted in from the Python edition.

The correct program is:

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
int main(int argc, char **argv)
{
    int fd = open("/sys/class/leds/ACT/trigger", O_WRONLY);
    write(fd, "timer", 5);
    close(fd);
    fd = open("/sys/class/leds/ACT/delay_on", O_WRONLY);
    write(fd, "2000", 4);
    close(fd);
    fd = open("/sys/class/leds/ACT/delay_off", O_WRONLY);
    write(fd, "3000", 4);
    close(fd);
}