git://git.jankratochvil.net
/
lptgpib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3fcb64a
)
+Nejsou prava na port - musis byt root
author
Jan Kratochvil
<jan.kratochvil@redhat.com>
Mon, 13 May 2013 17:33:52 +0000
(19:33 +0200)
committer
Jan Kratochvil
<jan.kratochvil@redhat.com>
Mon, 13 May 2013 17:33:52 +0000
(19:33 +0200)
lptgpib.c
patch
|
blob
|
history
diff --git
a/lptgpib.c
b/lptgpib.c
index
2a9f244
..
c5bbd62
100644
(file)
--- a/
lptgpib.c
+++ b/
lptgpib.c
@@
-84,7
+84,10
@@
void sig_handler(int sig){
void lptgpib_init(int base){
lpt_base = base;
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;
/* set realtime priority and lock us in memory */
struct sched_param scp;