Determining ESXi boot partition

What does boostate and updated field mean in boot.cfg? I am trying to figure out the way to determine the bootbank from which ESXi will boot. I was thinking of relying on bootstate = 0 but found that both bootbanks can have bootstate of 0.


The bootstate value determines whether the bootbank is usable.

A value of: 0 indicates a functioning bootbank, 1 indicates a recently upgraded bootbank, 2 indicates a defective bootbank and 3 indicates a bootbank has been voluntarily marked as bad/invalid for the purposes of rollback -1 is an invalid boot.cfg