blob: 02940147d30f9843b7f6c4523926dfd80beb7591 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
From a4b5cc7806861b75b03ea0d31e1413e3e293770c Mon Sep 17 00:00:00 2001
From: Jaco Kroon <jaco@uls.co.za>
Date: Thu, 20 Jan 2022 07:07:40 +0200
Subject: [PATCH] Move declaration of usage() function to avoid conflicting
implicit declaration.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
---
src/captagent.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/src/captagent.c b/src/captagent.c
index 6f5f533..052b0bb 100644
--- a/src/captagent.c
+++ b/src/captagent.c
@@ -108,6 +108,21 @@ void handler(int value) {
exit(0);
}
+void usage(int8_t e)
+{
+ printf(
+ "usage: Captagent <-vh> <-f config>\n"
+ " -h display help/usage\n"
+ " -a print a list of all availlable devices\n"
+ " -v display version information\n"
+ " -c validate configuration and exit\n"
+ " -d enable daemon mode\n"
+ " -n enable foreground mode\n"
+ " -f [/path/to/rtpagent.xml] to specify a config file\n"
+ " -D [/path/to/file.pcap] to specify a pcap file as input\n"
+ " -x [1 - 10] set debug level\n");
+ exit(e);
+}
// Print the list of availlable devices
static void print_all_devices()
@@ -230,22 +245,6 @@ int daemonize(int nofork)
error: return -1;
}
-void usage(int8_t e)
-{
- printf(
- "usage: Captagent <-vh> <-f config>\n"
- " -h display help/usage\n"
- " -a print a list of all availlable devices\n"
- " -v display version information\n"
- " -c validate configuration and exit\n"
- " -d enable daemon mode\n"
- " -n enable foreground mode\n"
- " -f [/path/to/rtpagent.xml] to specify a config file\n"
- " -D [/path/to/file.pcap] to specify a pcap file as input\n"
- " -x [1 - 10] set debug level\n");
- exit(e);
-}
-
void print_hw() {
char k[33];
--
2.33.1
|