diff options
author | Mark Purcell <msp@debian.org> | 2008-06-22 11:00:40 +1000 |
---|---|---|
committer | etobi <git@e-tobi.net> | 2013-09-03 09:48:42 +0200 |
commit | 891c51ff368ed700dec6025eeb47ce4d96f76418 (patch) | |
tree | 3729664829e4faa691d403274f38eb10890b533c /test/test_front.c | |
parent | 1c6e1f28f54ec2606c23936c1d8689f2be55a86c (diff) | |
parent | ab959d7b4194715870128e616b8e29d4a101e488 (diff) | |
download | linux-dvb-apps-891c51ff368ed700dec6025eeb47ce4d96f76418.tar.gz |
Imported Debian patch 1.1.1+rev1207-1debian/1.1.1+rev1207-1
Diffstat (limited to 'test/test_front.c')
-rw-r--r-- | test/test_front.c | 37 |
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); } - |