aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_front.c
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2013-09-03 09:48:41 +0200
committeretobi <git@e-tobi.net>2013-09-03 09:48:41 +0200
commitab959d7b4194715870128e616b8e29d4a101e488 (patch)
tree61a746231d30817be73416a7d67763fd677a1042 /test/test_front.c
parent6b350466c4902c5b137e0efaf1d189128a7f18f5 (diff)
downloadlinux-dvb-apps-ab959d7b4194715870128e616b8e29d4a101e488.tar.gz
Imported Upstream version 1.1.1+rev1207upstream/1.1.1+rev1207
Diffstat (limited to '')
-rw-r--r--test/test_front.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/test/test_front.c b/test/test_front.c
index 1d08fc6..72acbb6 100644
--- a/test/test_front.c
+++ b/test/test_front.c
@@ -1,4 +1,4 @@
-/*
+/*
* test_front.c - Test program for new API
*
* Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
@@ -40,7 +40,7 @@ int OSTSelftest(int fd)
{
int ans;
- if ( (ans = ioctl(fd,OST_SELFTEST,0) < 0)){
+ if ((ans = ioctl(fd,OST_SELFTEST,0)) < 0) {
perror("OST SELF TEST: ");
return -1;
}
@@ -52,7 +52,7 @@ int OSTSetPowerState(int fd, uint32_t state)
{
int ans;
- if ( (ans = ioctl(fd,OST_SET_POWER_STATE,state) < 0)){
+ if ((ans = ioctl(fd,OST_SET_POWER_STATE,state)) < 0) {
perror("OST SET POWER STATE: ");
return -1;
}
@@ -64,7 +64,7 @@ int OSTGetPowerState(int fd, uint32_t *state)
{
int ans;
- if ( (ans = ioctl(fd,OST_GET_POWER_STATE,state) < 0)){
+ if ((ans = ioctl(fd,OST_GET_POWER_STATE,state)) < 0) {
perror("OST GET POWER STATE: ");
return -1;
}
@@ -95,7 +95,7 @@ int FEReadStatus(int fd)
int ans;
feStatus stat;
- if ( (ans = ioctl(fd,FE_READ_STATUS,&stat) < 0)){
+ if ((ans = ioctl(fd,FE_READ_STATUS,&stat)) < 0) {
perror("FE READ STATUS: ");
return -1;
}
@@ -116,7 +116,7 @@ int FEReadBER(int fd, uint32_t *ber)
{
int ans;
- if ( (ans = ioctl(fd,FE_READ_BER, ber) < 0)){
+ if ((ans = ioctl(fd,FE_READ_BER, ber)) < 0) {
perror("FE READ_BER: ");
return -1;
}
@@ -129,7 +129,7 @@ int FEReadSignalStrength(int fd, int32_t *strength)
{
int ans;
- if ( (ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength) < 0)){
+ if ((ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength)) < 0) {
perror("FE READ SIGNAL STRENGTH: ");
return -1;
}
@@ -142,7 +142,7 @@ int FEReadSNR(int fd, int32_t *snr)
{
int ans;
- if ( (ans = ioctl(fd,FE_READ_SNR, snr) < 0)){
+ if ((ans = ioctl(fd,FE_READ_SNR, snr)) < 0) {
perror("FE READ_SNR: ");
return -1;
}
@@ -156,7 +156,7 @@ int FEReadUncorrectedBlocks(int fd, uint32_t *ucb)
{
int ans;
- if ( (ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb) < 0)){
+ if ((ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb)) < 0) {
perror("FE READ UNCORRECTED BLOCKS: ");
return -1;
}
@@ -169,7 +169,7 @@ int FEGetNextFrequency(int fd, uint32_t *nfr)
{
int ans;
- if ( (ans = ioctl(fd,FE_GET_NEXT_FREQUENCY, nfr) < 0)){
+ if ((ans = ioctl(fd,FE_GET_NEXT_FREQUENCY, nfr)) < 0) {
perror("FE GET NEXT FREQUENCY: ");
return -1;
}
@@ -182,7 +182,7 @@ int FEGetNextSymbolRate(int fd, uint32_t *nsr)
{
int ans;
- if ( (ans = ioctl(fd,FE_GET_NEXT_SYMBOL_RATE, nsr) < 0)){
+ if ((ans = ioctl(fd,FE_GET_NEXT_SYMBOL_RATE, nsr)) < 0) {
perror("FE GET NEXT SYMBOL RATE: ");
return -1;
}
@@ -195,7 +195,7 @@ int QPSKTune(int fd, struct qpskParameters *param)
{
int ans;
- if ( (ans = ioctl(fd,QPSK_TUNE, param) < 0)){
+ if ((ans = ioctl(fd,QPSK_TUNE, param)) < 0) {
perror("QPSK TUNE: ");
return -1;
}
@@ -207,7 +207,7 @@ int QPSKGetEvent (int fd, struct qpskEvent *event)
{
int ans;
- if ( (ans = ioctl(fd,QPSK_GET_EVENT, event) < 0)){
+ if ((ans = ioctl(fd,QPSK_GET_EVENT, event)) < 0) {
perror("QPSK GET EVENT: ");
return -1;
}
@@ -219,7 +219,7 @@ int QPSKFEInfo (int fd, struct qpskFrontendInfo *info)
{
int ans;
- if ( (ans = ioctl(fd,QPSK_FE_INFO, info) < 0)){
+ if ((ans = ioctl(fd,QPSK_FE_INFO, info)) < 0) {
perror("QPSK FE INFO: ");
return -1;
}
@@ -238,7 +238,7 @@ int SecGetStatus (int fd, struct secStatus *state)
{
int ans;
- if ( (ans = ioctl(fd,SEC_GET_STATUS, state) < 0)){
+ if ((ans = ioctl(fd,SEC_GET_STATUS, state)) < 0) {
perror("QPSK GET EVENT: ");
return -1;
}
@@ -261,7 +261,7 @@ int SecGetStatus (int fd, struct secStatus *state)
break;
}
-
+
switch (state->selVolt){
case SEC_VOLTAGE_OFF:
printf("SEC VOLTAGE: OFF (%d)\n",state->selVolt);
@@ -299,11 +299,11 @@ main(int argc, char **argv)
struct qpskFrontendInfo info;
struct secStatus sec_state;
- if((fd = open("/dev/ost/qpskfe",O_RDWR)) < 0){
+ if ((fd = open("/dev/ost/qpskfe",O_RDWR)) < 0){
perror("FRONTEND DEVICE: ");
return -1;
}
- if((fd_sec = open("/dev/ost/sec",O_RDWR)) < 0){
+ if ((fd_sec = open("/dev/ost/sec",O_RDWR)) < 0){
perror("SEC DEVICE: ");
return -1;
}
@@ -325,4 +325,3 @@ main(int argc, char **argv)
close(fd);
close(fd_sec);
}
-