Hi,
On Sat, Sep 29, 2007 at 04:29:16AM +0400, Manu Abraham wrote:
> [...]
> The hacked szap is here http://abraham.manu.googlepages.com/szap.c
> [...]
I made a small patch for your szap.c so that
szap -x SomeChannel
will exit with exit code 0 on a successful tune and with 1 on a
unsuccessful tune.
It is really helpfull for tuning channels out of a bash script.
Regards, Artem
--
Artem Makhutov
Unterort Str. 36
D-65760 Eschborn
--- old/szap.c 2007-10-10 15:16:24.000000000 +0200
+++ new/szap.c 2007-10-10 15:11:03.000000000 +0200
@@ -329,13 +329,16 @@
printf("FE_HAS_LOCK");
printf("\n");
- if (exit_after_tuning && ((status & FE_HAS_LOCK) || (++timeout >= 10)))
+ if (exit_after_tuning && (!(status & FE_HAS_LOCK) && (++timeout >= 10)))
+ return FALSE;
+
+ if (exit_after_tuning && (status & FE_HAS_LOCK))
break;
usleep(1000000);
} while (1);
- return 0;
+ return TRUE;
}
@@ -496,7 +499,7 @@
}
}
- check_frontend (fefd, dvr);
+ result = check_frontend (fefd, dvr);
if (!interactive) {
close(patfd);
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb