diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-18 13:13:27 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-18 13:37:06 +0000 |
| commit | 27371af4bc6d3b1dfec6a498585769ccdb3b15f6 (patch) | |
| tree | 97759cb4b95a11e42bef0f9df93b297fd19b0b96 /util/nvmutil/usage.c | |
| parent | 722ed03179ec43d7b71f927f1a53579ccf5ebff8 (diff) | |
nvmutil: split nvmutil.c into multiple files
this is a big program now. act like it.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/usage.c')
| -rw-r--r-- | util/nvmutil/usage.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/util/nvmutil/usage.c b/util/nvmutil/usage.c new file mode 100644 index 00000000..867e4c44 --- /dev/null +++ b/util/nvmutil/usage.c @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: MIT + * + * Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com> + * Copyright (c) 2026 Leah Rowe <leah@libreboot.org> + * + */ + +#ifdef __OpenBSD__ +#include <sys/param.h> +#endif +#include <sys/types.h> +#include <sys/stat.h> + +#include <errno.h> +#include <fcntl.h> +#include <limits.h> +#include <stdarg.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <unistd.h> + +#include "include/common.h" + +void +usage(void) +{ + const char *util; + + 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"); +} |
