File: usage.c

package info (click to toggle)
lsm 1.0.21-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: ansic: 3,883; sh: 318; makefile: 62
file content (30 lines) | stat: -rw-r--r-- 581 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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(FOOLSM_VERSION)
        printf("%s version %s\n", get_prog(), FOOLSM_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 */