- fprintf(stderr, "fw_printenv/fw_setenv, "
- "a command line interface to U-Boot environment\n\n"
- "usage:\tfw_printenv [-n] [variable name]\n"
- "\tfw_setenv [variable name] [variable value]\n"
- "\tfw_setenv -s [ file ]\n"
- "\tfw_setenv -s - < [ file ]\n\n"
- "The file passed as argument contains only pairs "
- "name / value\n"
- "Example:\n"
- "# Any line starting with # is treated as comment\n"
+ fprintf(stderr,
+ "Usage: fw_printenv [OPTIONS]... [VARIABLE]...\n"
+ "Print variables from U-Boot environment\n"
+ "\n"
+ " -h, --help print this help.\n"
+#ifdef CONFIG_ENV_AES
+ " -a, --aes aes key to access environment\n"
+#endif
+#ifdef CONFIG_FILE
+ " -c, --config configuration file, default:" CONFIG_FILE "\n"
+#endif
+ " -n, --noheader do not repeat variable name in output\n"
+ " -l, --lock lock node, default:/var/lock\n"
+ "\n");
+}
+
+void usage_env_set(void)
+{
+ fprintf(stderr,
+ "Usage: fw_setenv [OPTIONS]... [VARIABLE]...\n"
+ "Modify variables in U-Boot environment\n"
+ "\n"
+ " -h, --help print this help.\n"
+#ifdef CONFIG_ENV_AES
+ " -a, --aes aes key to access environment\n"
+#endif
+#ifdef CONFIG_FILE
+ " -c, --config configuration file, default:" CONFIG_FILE "\n"
+#endif
+ " -l, --lock lock node, default:/var/lock\n"
+ " -s, --script batch mode to minimize writes\n"
+ "\n"
+ "Examples:\n"
+ " fw_setenv foo bar set variable foo equal bar\n"
+ " fw_setenv foo clear variable foo\n"
+ " fw_setenv --script file run batch script\n"