Fixed handling of device flags.  The real flags were never used.
Fixed handling of device flags.  The real flags were never used.

Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase