The czap utility (dvb-apps/util/szap/czap.c) cannot scan the channel
configuration file when compiled on Fedora 12 with gcc-4.4.2.

The czap output is:

[kl...@myth2 szap]$ ./czap -c ~/.czap/ziggo-channels.conf Cartoon
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
reading channels from file '/local/klaas/.czap/ziggo-channels.conf'
  1 Cartoon:356000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:1660:1621
ERROR: cannot parse service data

Problem is tha the "sscanf" function uses the "%a[^:]" format
specifier. According to "man sscanf" you need to define _GNU_SOURCE if
you want this to work because it is a gnu-only extension.
Adding a first line "#define _GNU_SOURCE" to czap.c and recompiling
solves the problem.

The czap output is now:

[kl...@myth2 szap]$ ./czap -c ~/.czap/ziggo-channels.conf Cartoon
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
reading channels from file '/local/klaas/.czap/ziggo-channels.conf'
  1 Cartoon:356000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:1660:1621
  1 Cartoon: f 356000000, s 6875000, i 2, fec 0, qam 3, v 0x67c, a 0x655
status 00 | signal 0000 | snr b7b7 | ber 000fffff | unc 00000098 |
status 1f | signal d5d5 | snr f3f3 | ber 000006c0 | unc 0000009b | FE_HAS_LOCK
status 1f | signal d5d5 | snr f4f4 | ber 00000000 | unc 00000000 | FE_HAS_LOCK

This is done on a Linux 2.6.32.2 kernel with a TT C-1501 DVB-C card.

Signed-off-by: Klaas de Waal <klaas.de.w...@gmail.com>

-------------------------------------------------------------------------------------------

diff -r 61b72047a995 util/szap/czap.c
--- a/util/szap/czap.c  Sun Jan 17 17:03:27 2010 +0100
+++ b/util/szap/czap.c  Sun Jan 24 11:40:43 2010 +0100
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to