void lptgpib_init(int base){
lpt_base = base;
- ioperm(lpt_base, 4, 1);
+ if (ioperm(lpt_base, 4, 1) != 0) {
+ fprintf(stderr,"Nejsou prava na port - musis byt root: %m\n");
+ exit(1);
+ }
/* set realtime priority and lock us in memory */
struct sched_param scp;