summaryrefslogtreecommitdiffstats
path: root/include/c.h
diff options
context:
space:
mode:
authorSami Kerola2011-08-20 19:25:46 +0200
committerSami Kerola2011-08-28 10:50:36 +0200
commitcd7accd4465ba51d3435ca90c8a474d5784747d1 (patch)
treeeb563ec8e73c8f752aebea874db28c1254a7ad53 /include/c.h
parentdocs: new file Documentation/release-schedule.txt (diff)
downloadkernel-qcow2-util-linux-cd7accd4465ba51d3435ca90c8a474d5784747d1.tar.gz
kernel-qcow2-util-linux-cd7accd4465ba51d3435ca90c8a474d5784747d1.tar.xz
kernel-qcow2-util-linux-cd7accd4465ba51d3435ca90c8a474d5784747d1.zip
arch: start using arch as a usage() example
The arch command is hijacked to be example of howto write usage as defined in Documentation/howto-usage-function.txt Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include/c.h')
-rw-r--r--include/c.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/c.h b/include/c.h
index a9cd1f3f5..975cc1bf4 100644
--- a/include/c.h
+++ b/include/c.h
@@ -210,4 +210,17 @@ static inline int dirfd(DIR *d)
#define IUTF8 0040000
#endif
+/*
+ * Constant strings for usage() functions. For more info see
+ * Documentation/howto-usage-function.txt and sys-utils/arch.c
+ */
+#define USAGE_HEADER _("\nUsage:\n")
+#define USAGE_OPTIONS _("\nOptions:\n")
+#define USAGE_HELP _(" -h, --help display this help and exit\n")
+#define USAGE_VERSION _(" -V, --version output version information and exit\n")
+#define USAGE_BEGIN_TAIL _("\n")
+#define USAGE_MAN_TAIL _("For more details see %s.\n")
+
+#define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING
+
#endif /* UTIL_LINUX_C_H */