mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-22 22:40:55 +02:00
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:
@@ -81,8 +81,8 @@ typedef struct op {
|
|||||||
const char *str;
|
const char *str;
|
||||||
void (*cmd)(void);
|
void (*cmd)(void);
|
||||||
int args;
|
int args;
|
||||||
} op_t;
|
} op;
|
||||||
static const op_t op[] = {
|
static const op ops[] = {
|
||||||
{ "dump", cmd_dump, 3 },
|
{ "dump", cmd_dump, 3 },
|
||||||
{ "setmac", cmd_setmac, 3 },
|
{ "setmac", cmd_setmac, 3 },
|
||||||
{ "swap", cmd_swap, 3 },
|
{ "swap", cmd_swap, 3 },
|
||||||
@@ -140,15 +140,15 @@ set_cmd(int argc, char *argv[])
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; (i < items(op)) && (cmd == NULL); i++) {
|
for (i = 0; (i < items(ops)) && (cmd == NULL); i++) {
|
||||||
if (strcmp(COMMAND, op[i].str) != 0)
|
if (strcmp(COMMAND, ops[i].str) != 0)
|
||||||
continue;
|
continue;
|
||||||
if (argc >= op[i].args) {
|
if (argc >= ops[i].args) {
|
||||||
cmd = op[i].cmd;
|
cmd = ops[i].cmd;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
err(set_err(EINVAL), "Too few args on command '%s'",
|
err(set_err(EINVAL), "Too few args on command '%s'",
|
||||||
op[i].str);
|
ops[i].str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user