9. Configuring your Program

Your program invokes functions that are privileged. Thus, before you can run it, you need to add a file named lab2 to the /etc/system.conf.d/ directory to grant your program the necessary permissions.

Unless you use privileged functions that are not really necessary, the following entry is enough:

service lab2 { system DEVIO IRQCTL ; ipc SYSTEM rs vm pm vfs ; io 40:4 # i8254 ports 61 # port for speaker control ; irq 0 # TIMER 0 IRQ ; uid 0 ; };

You can find this file in file lab2/conf/lab2 of the archive with Lab2 directory tree.

IMP. Remember that you must be root to write to /etc/system.conf.d/