None of the callers actually need the device itself. So it makes sense to do the lookup inside determine_state_file instead.
mentioned in commit 55a2b3a6