diff options
| author | 童宗振 <[email protected]> | 2024-04-12 09:05:44 +0000 |
|---|---|---|
| committer | 童宗振 <[email protected]> | 2024-04-12 09:05:44 +0000 |
| commit | 21522870f7a4dea01db7a024038e4a8f1f75b9e7 (patch) | |
| tree | c14cc4a1e0301a0a86b894a2e9adf6eea1cfde41 /src/main.c | |
| parent | 97284a9b278838a8e84beb54ce18653d3ed42c4d (diff) | |
Add packet
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -69,7 +69,8 @@ void usage() "\n" " -c config file path\n" " -d dynamic config file path\n" - " -h\n" + " -v show current version\n" + " -h \n" "\n"); exit(0); } @@ -81,7 +82,7 @@ int main(int argc, char * argv[]) char config_path[PATH_MAX]; char dy_config_path[PATH_MAX]; int opt = 0; - while ((opt = getopt(argc, argv, "c:d:h")) != -1) + while ((opt = getopt(argc, argv, "c:d:hv")) != -1) { char * endptr = NULL; switch (opt) @@ -98,6 +99,10 @@ int main(int argc, char * argv[]) snprintf(dy_config_path, sizeof(dy_config_path), "%s", optarg); break; } + case 'v': { + printf("dp_trace_telemetry current version: %s\n", DP_TRACE_VERSION); + exit(0); + } default: usage(); break; |
