summaryrefslogtreecommitdiff
path: root/util/nvmutil/lib/usage.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-04-21 13:39:29 +0100
committerLeah Rowe <leah@libreboot.org>2026-04-21 13:39:29 +0100
commit7f4f07fc4039353ee499d76bb53b6c742adb6428 (patch)
tree69da1a8915bd9e28535eed9d6875c41002134987 /util/nvmutil/lib/usage.c
parent4b5aca8ff89bf46538a59bb55512dedeedbf1cbb (diff)
use old nvmutil for now, in lbmk
i'm trying to make nvmutil work on openbsd. the new code in lbutils is a bit buggy, likely somewhere in mkhtemp. i'm still debugging it. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/lib/usage.c')
-rw-r--r--util/nvmutil/lib/usage.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/util/nvmutil/lib/usage.c b/util/nvmutil/lib/usage.c
new file mode 100644
index 00000000..3b0614e8
--- /dev/null
+++ b/util/nvmutil/lib/usage.c
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: MIT
+ * Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com>
+ * Copyright (c) 2026 Leah Rowe <leah@libreboot.org>
+ */
+
+#include <errno.h>
+#include <stdio.h>
+
+#include "../include/common.h"
+
+void
+usage(void)
+{
+ const char *util = getnvmprogname();
+
+ fprintf(stderr,
+ "Modify Intel GbE NVM images e.g. set MAC\n"
+ "USAGE:\n"
+ "\t%s FILE dump\n"
+ "\t%s FILE setmac [MAC]\n"
+ "\t%s FILE swap\n"
+ "\t%s FILE copy 0|1\n"
+ "\t%s FILE cat\n"
+ "\t%s FILE cat16\n"
+ "\t%s FILE cat128\n",
+ util, util, util, util,
+ util, util, util);
+
+ err(EINVAL, "Too few arguments");
+}