util/nvmutil: rename op_t to op

and op to ops

typedefs not part of any base system e.g. openbsd
base system, or e.g. the libc, should not have _t
in them.

this is a stylistic change, and does not alter any
actual program behaviour.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-03 16:06:02 +00:00
parent f03570b674
commit b3119c8b4d
+7 -7
View File
@@ -81,8 +81,8 @@ typedef struct op {
const char *str;
void (*cmd)(void);
int args;
} op_t;
static const op_t op[] = {
} op;
static const op ops[] = {
{ "dump", cmd_dump, 3 },
{ "setmac", cmd_setmac, 3 },
{ "swap", cmd_swap, 3 },
@@ -140,15 +140,15 @@ set_cmd(int argc, char *argv[])
return;
}
for (i = 0; (i < items(op)) && (cmd == NULL); i++) {
if (strcmp(COMMAND, op[i].str) != 0)
for (i = 0; (i < items(ops)) && (cmd == NULL); i++) {
if (strcmp(COMMAND, ops[i].str) != 0)
continue;
if (argc >= op[i].args) {
cmd = op[i].cmd;
if (argc >= ops[i].args) {
cmd = ops[i].cmd;
break;
}
err(set_err(EINVAL), "Too few args on command '%s'",
op[i].str);
ops[i].str);
}
}