David Reguera Garcia has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/79405?usp=email )
Change subject: buspirate_spi: Stop execution when invalid params ......................................................................
buspirate_spi: Stop execution when invalid params
Change-Id: Icce40fa841bb3289db4a4895785bb19dfb625e5f Signed-off-by: David Reguera Garcia dreg@rootkit.es --- M buspirate_spi.c 1 file changed, 12 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/79405/1
diff --git a/buspirate_spi.c b/buspirate_spi.c index 7436d80..e09cea5 100644 --- a/buspirate_spi.c +++ b/buspirate_spi.c @@ -375,8 +375,10 @@ hiz = true; else if (strcasecmp("off", tmp) == 0) ; // ignore - else - msg_perr("Invalid hiz state, not using them.\n"); + else { + msg_perr("Invalid hiz state. Use on/off.\n"); + return 1; + } } free(tmp);
@@ -386,8 +388,10 @@ pullup = true; else if (strcasecmp("off", tmp) == 0) ; // ignore - else - msg_perr("Invalid pullups state, not using them.\n"); + else { + msg_perr("Invalid pullups state. Use on/off.\n"); + return 1; + } } free(tmp);
@@ -397,8 +401,10 @@ psu = true; else if (strcasecmp("off", tmp) == 0) ; // ignore - else - msg_perr("Invalid psus state, not enabling.\n"); + else { + msg_perr("Invalid psus state. Use on/off.\n"); + return 1; + } } free(tmp);