crossystem: Return error when trying to read GPIO port zero

For the record, zero is a valid GPIO port number.  Unfortunately
firmware uses port zero to denote that a GPIO port is not exist.
So crossystem should not attempt to read GPIO port zero, but
return error instead.

Signed-off-by: Che-Liang Chiou <>

TEST=On Snow, run crossystem and see devsw_cur and recoverysw_cur
     are "(error)"

Change-Id: I70b15824f613df1e46bf152515ad4e9362c9f066
Commit-Ready: Che-Liang Chiou <>
Tested-by: Che-Liang Chiou <>
Reviewed-by: Cheng-Yi Chiang <>
Tested-by: Cheng-Yi Chiang <>
1 file changed