Skip to contentSkip to conversation

commands: saveenv: exit on invalid option

PATCH Applied Enrico Jorns 2 participants 2 messages Sep 1, 2016 – Sep 5, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 commands: saveenv: exit on invalid option

Saveenv should not perform any actions if an invalid parameter was given.

---
 commands/saveenv.c | 2 ++
 1 file changed, 2 insertions(+)
commands/saveenv.c +2 -0
index 6f210b7..bc1202f 100644
@@ -35,6 +35,8 @@ static int do_saveenv(int argc, char *argv[])
 		case 'z':
 			envfs_flags |= ENVFS_FLAGS_FORCE_BUILT_IN;
 			break;
+		default:
+			return COMMAND_ERROR_USAGE;
 		}
 	}
 
Signature · 7 lines
2.8.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 7 lines · Enrico Jorns

Saveenv should not perform any actions if an invalid parameter was given.

---
 commands/saveenv.c | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks

Sascha

Quoted 23 lines
commands/saveenv.c +2 -0
index 6f210b7..bc1202f 100644
@@ -35,6 +35,8 @@ static int do_saveenv(int argc, char *argv[])
 		case 'z':
 			envfs_flags |= ENVFS_FLAGS_FORCE_BUILT_IN;
 			break;
+		default:
+			return COMMAND_ERROR_USAGE;
 		}
 	}
 
Signature · 7 lines
2.8.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox