firmware-tools/ptgen: use portable exit codes