MCPcopy Create free account
hub / github.com/coreboot/coreboot / usage

Function usage

util/nvramtool/common.c:47–84  ·  view source on GitHub ↗

* usage * * Write a usage message to 'outfile'. If 'outfile' is 'stderr' then exit * with a value of 1. Otherwise exit with a value of 0. ****************************************************************************/

Source from the content-addressed store, hash-verified

45 * with a value of 1. Otherwise exit with a value of 0.
46 ****************************************************************************/
47void usage(FILE * outfile)
48{
49 fprintf(outfile,
50 "Usage: %s [-y LAYOUT_FILE | -t] PARAMETER ...\n\n"
51 " Read/write coreboot parameters or show info from "
52 "coreboot table.\n\n"
53 " -y LAYOUT_FILE: Use CMOS layout specified by "
54 "LAYOUT_FILE.\n"
55 " -t: Use CMOS layout specified by CMOS option "
56 "table.\n"
57 " -C CBFS_FILE: Use CBFS file for layout and CMOS data.\n"
58 " -D CMOS_FILE: Use CMOS file for CMOS data (overrides CMOS of -C).\n"
59 " [-n] -r NAME: Show parameter NAME. If -n is given, "
60 "show value only.\n"
61 " -e NAME: Show all possible values for parameter "
62 "NAME.\n"
63 " -a: Show names and values for all "
64 "parameters.\n"
65 " -w NAME=VALUE: Set parameter NAME to VALUE.\n"
66 " -p INPUT_FILE: Set parameters according to INPUT_FILE.\n"
67 " -i: Same as -p but file contents taken from "
68 "standard input.\n"
69 " -c [VALUE]: Show CMOS checksum or set checksum to "
70 "VALUE.\n"
71 " -l [ARG]: Show coreboot table info for ARG, or "
72 "all ARG choices.\n"
73 " -L OUTPUT_BIN Write CMOS layout file in binary format\n"
74 " -H OUTPUT_HDR Write CMOS layout file in header format\n"
75 " -d: Show low-level dump of coreboot table.\n"
76 " -Y: Show CMOS layout info.\n"
77 " -b OUTPUT_FILE: Dump CMOS memory contents to file.\n"
78 " -B INPUT_FILE: Write file contents to CMOS memory.\n"
79 " -x: Show hex dump of CMOS memory.\n"
80 " -X DUMPFILE: Show hex dump of CMOS dumpfile.\n"
81 " -v: Show version info for this program.\n"
82 " -h: Show this message.\n", prog_name);
83 exit(outfile == stderr);
84}

Callers 5

parse_nvramtool_argsFunction · 0.50
register_opFunction · 0.50
sanity_check_argsFunction · 0.50
op_show_usageFunction · 0.50
parse_assignmentFunction · 0.50

Calls 2

fprintfFunction · 0.85
exitFunction · 0.85

Tested by

no test coverage detected