Merge the help message into a single function,
so that we can use it somewhere else.
Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
return 0;
}
+static void usage(void)
+{
+ fprintf(stderr,
+ "Usage:\n"
+ " nvram show\n"
+ " nvram info\n"
+ " nvram get variable\n"
+ " nvram set variable=value [set ...]\n"
+ " nvram unset variable [unset ...]\n"
+ " nvram commit\n"
+ );
+}
int main( int argc, const char *argv[] )
{
}
else if( !done )
{
- fprintf(stderr,
- "Usage:\n"
- " nvram show\n"
- " nvram info\n"
- " nvram get variable\n"
- " nvram set variable=value [set ...]\n"
- " nvram unset variable [unset ...]\n"
- " nvram commit\n"
- );
-
+ usage();
stat = 1;
}