diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-08 17:54:26 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-08 17:54:26 +0000 |
| commit | 5532a721f5cde7b1ac7b80a44e1ccbec2bb43d23 (patch) | |
| tree | c816afb7b885a1fc4a09e2cf7ffb58db21dd48c3 /util/nvmutil | |
| parent | 35ffe6476553742b8ad3c3e0a7272398f2a1c0db (diff) | |
util/nvmutil: clean up some code
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 212e1a3e..c5bd2d6d 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -216,6 +216,7 @@ struct commands { uint8_t set_modified; /* both, one part, both or neither */ /* affected by invert */ uint8_t arg_part; /* 0: no part given. 1: part given */ + /* if set, only the user-specified part is read */ }; /* @@ -474,20 +475,22 @@ set_cmd_args(int argc, char *argv[]) mac_str = rmac; } - /* - * This will never actually run. - * It's put here as a guard against - * future regressions by maintainers. - * - * The reason this shouldn't run is - * because when a bad command (or no - * command) is given, either the command - * should be treated as a MAC address, - * or if no command is given, a random - * MAC address is used. - */ - if (!valid_command(cmd_index)) { + /* + * This should never actually run. + * It's put here as a guard against + * future regressions by maintainers. + * + * The reason this shouldn't run is + * because when a bad command (or no + * command) is given, either the command + * should be treated as a MAC address, + * or if no command is given, a random + * MAC address is used. + * + * Therefore, a valid command should + * always exist at this point. + */ usage(0); err(EINVAL, "Unhandled command error"); } |
