diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-06 23:56:19 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-06 23:56:19 +0000 |
| commit | 9e5736baa900b0baf8af17064e9e05973ad3cabc (patch) | |
| tree | 8ba4bba31fbbeec746c4bac87aee1f2a076ad9e6 /util | |
| parent | 13b35ed1fc5daa0e99fd92b86b854738637f9704 (diff) | |
util/nvmutil: remove reset_global_state
it was put there for another change i haven't done yet,
and probably won't. the program currently just runs once
with one operation, on a given file.
the current defaults are initialised just fine without
this function, so let's remove this bloat for now.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 62949c22..07d2b938 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -27,7 +27,6 @@ #endif #endif -static void reset_global_state(void); static void set_cmd(int argc, char *argv[]); static void check_cmd_args(int argc, char *argv[]); static size_t conv_argv_part_num(const char *part_str); @@ -161,7 +160,6 @@ main(int argc, char *argv[]) if (argc < 2) usage(); - reset_global_state(); fname = argv[1]; #ifdef __OpenBSD__ @@ -239,32 +237,6 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } -/* - * Currently redundant, because the program only runs - * once, but I plan to expand this tool so that it can - * work on multiple files, using getop switches as args. - */ -static void -reset_global_state(void) -{ - errno = 0; - - mac_str = NULL; - invert = 0; - part_modified[0] = 0; - part_modified[1] = 0; - fname = ""; - cmd = NULL; - gbe_fd = -1; -#ifndef HAVE_ARC4RANDOM_BUF - rfd = -1; -#endif - part = 0; - - memset(mac_buf, 0, sizeof(mac_buf)); - memset(buf, 0, sizeof(buf)); -} - static void set_cmd(int argc, char *argv[]) { |
