Open dglo opened 3 years ago
[jkelley on 2020-02-18 01:47:32] Very minor bug. Trying to read the id will still produce an error, it just takes a while to timeout.
$ cat /proc/driver/domhub/card3/pair0/domA/id Can't get DOM ID for card 3 Pair 0 DOM A.
The correct behavior is to immediately return and report
Can't get ID for non-communicating DOM (card 3 Pair 0 DOM A).
[jkelley on 2020-02-18 17:12:39] Fixed in V02-16-00 by adding parentheses around equality state check.
The updated compiler in RHEL8 catches this in the driver:
/home/icecube/jkelley/dor-driver/driver/dh.c: In function âdh_domid_read_procâ: /home/icecube/jkelley/dor-driver/driver/dh.c:5325:60: warning: comparison of constant â2â with boolean expression is always false [-Wbool-compare] if(! dh_get_pair_pwr_state(d->cardnum, d->pairnum) == DH_PWR_STATE_ON / Powered on / ^~ /home/icecube/jkelley/dor-driver/driver/dh.c:5325:60: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] /home/icecube/jkelley/dor-driver/driver/dh.c:5325:12: note: add parentheses around left hand side expression to silence this warning if(! dh_get_pair_pwr_state(d->cardnum, d->pairnum) == DH_PWR_STATE_ON / Powered on / ^
~~~~~~~~~~ ( )