better error handling, part 28
This commit is contained in:
parent
bcf57f8764
commit
0a1abce976
@ -49,6 +49,7 @@ do {
|
||||
|
||||
if (r == -1) {
|
||||
fprintf(stderr, "error %d, %s\n", errno, strerror(errno));
|
||||
sleep(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
@ -103,7 +104,7 @@ if (verbosity) {
|
||||
|
||||
fd = v4l2_open(dev_name, O_RDWR | O_NONBLOCK, 0);
|
||||
if (fd < 0) {
|
||||
perror("Cannot open device");
|
||||
perror(dev_name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user