aboutsummaryrefslogtreecommitdiff
path: root/usage.c
diff options
context:
space:
mode:
authorLucas Castro <lucas@gnuabordo.com.br>2024-01-10 22:33:44 -0300
committerLucas Castro <lucas@gnuabordo.com.br>2024-01-10 22:33:44 -0300
commita4270020addc324fb60d2b1b446b41bc31e3baf8 (patch)
tree8708f08c66a63f08c0cd88ab1a46faadcd3f4706 /usage.c
Import Upstream version 1.0.4upstream/1.0.4
Diffstat (limited to 'usage.c')
-rw-r--r--usage.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/usage.c b/usage.c
new file mode 100644
index 0000000..6433488
--- /dev/null
+++ b/usage.c
@@ -0,0 +1,30 @@
+/*
+
+ (C) 2014 Mika Ilmaranta <ilmis@nullnet.fi>
+
+ License: GPLv2
+
+*/
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "globals.h"
+#include "usage.h"
+
+void usage_and_exit(void) {
+#if defined(LSM_VERSION)
+ printf("%s version %s\n", get_prog(), LSM_VERSION);
+#endif
+ printf("usage: %s\n"
+ " [-h|--help|-v|--version]\n"
+ " [-c|--config <config_file>]\n"
+ " [-p|--pidfile <pid_file>]\n"
+ " [-f|--no-fork]\n", get_prog());
+ printf("check syslog for debug/error messages\n");
+
+ exit(2);
+}
+
+/* EOF */