blob: ac2205c4962c5f35b0e24b0f1071217f37fc9daf (
plain)
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
31
32
33
34
35
36
37
|
/* ISC license. */
#include <skalibs/buffer.h>
#include <skalibs/strerr.h>
#include "s6-internal.h"
#define MAIN_HELP_MESSAGE "This is the main help message.\n"
#define PROCESS_HELP_MESSAGE "This is the process help message.\n"
#define SERVICE_HELP_MESSAGE "This is the service help message.\n"
static int print_help (char const *msg)
{
if (!buffer_putsflush(buffer_1, msg))
strerr_diefu1sys(111, "write to stdout") ;
return 0 ;
}
int process_help (char const* const *argv)
{
(void)argv ;
return print_help(PROCESS_HELP_MESSAGE) ;
}
int service_help (char const* const *argv)
{
(void)argv ;
return print_help(SERVICE_HELP_MESSAGE) ;
}
int help (char const *const *argv)
{
(void)argv ;
return print_help(MAIN_HELP_MESSAGE) ;
}
|