summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-07-28 18:01:40 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-07-31 14:00:52 +0000
commitee004de9691ff52eeebb492273bd5ac1d85c7006 (patch)
tree873a9561598b1c570fc28ff886c90057511cab07 /util
parent166de9997a31cb752b5e6f8092997ba4bf14a421 (diff)
util/sconfig: rework help text printing
Drop the program name and split the printf call with multiple lines of text into separate printk calls. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I43df1fd02ce0fdbb6b22e1d4eda45017811c48d8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76774 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/sconfig/main.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index fb598282da..dd26e07de8 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -1986,17 +1986,16 @@ static void generate_outputf(FILE *f)
fprintf(f, "\n#endif /* __STATIC_FW_CONFIG_H */\n");
}
-static void usage(const char *name)
-{
- printf("Usage: %s <options>\n", name);
- printf("Options:\n"
- " -c | --output_c : Path to output static.c file (required)\n"
- " -r | --output_h : Path to header static.h file (required)\n"
- " -d | --output_d : Path to header static_devices.h file (required)\n"
- " -f | --output_f : Path to header static_fw_config.h file (required)\n"
- " -m | --mainboard_devtree : Path to mainboard devicetree file (required)\n"
- " -o | --override_devtree : Path to override devicetree file (optional)\n"
- " -p | --chipset_devtree : Path to chipset/SOC devicetree file (optional)\n");
+static void usage(void)
+{
+ printf("Usage: sconfig <options>\n");
+ printf(" -c | --output_c : Path to output static.c file (required)\n");
+ printf(" -r | --output_h : Path to header static.h file (required)\n");
+ printf(" -d | --output_d : Path to header static_devices.h file (required)\n");
+ printf(" -f | --output_f : Path to header static_fw_config.h file (required)\n");
+ printf(" -m | --mainboard_devtree : Path to mainboard devicetree file (required)\n");
+ printf(" -o | --override_devtree : Path to override devicetree file (optional)\n");
+ printf(" -p | --chipset_devtree : Path to chipset/SOC devicetree file (optional)\n");
exit(1);
}
@@ -2049,12 +2048,12 @@ int main(int argc, char **argv)
break;
case 'h':
default:
- usage(argv[0]);
+ usage();
}
}
if (!base_devtree || !outputc || !outputh || !outputd || !outputf)
- usage(argv[0]);
+ usage();
if (chipset_devtree) {
/* Use the chipset devicetree as the base, then override