Skip to content

Commit 40db551

Browse files
authored
Merge pull request #743 from tomismyfriend/develop
uadk_tool/dfx: repair and optimize the parameter acquisition mode
2 parents cb7f986 + eb8ee45 commit 40db551

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

uadk_tool/dfx/uadk_dfx.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "include/wd.h"
1515
#include "uadk_dfx.h"
1616

17-
#define uadk_build_date() printf("built on: %s %s\n", __DATE__, __TIME__)
1817
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
1918
#define PRIVILEGE_FLAG 0666
2019

@@ -35,7 +34,6 @@ struct uadk_env_table {
3534

3635
enum dfx_op_type {
3736
DISPLAY_VERSION = 2,
38-
DISPLAY_DATE,
3937
DISPLAY_DIR,
4038
DISPLAY_ENV,
4139
DISPLAY_COUNT,
@@ -185,7 +183,6 @@ void print_dfx_help(void)
185183
printf(" uadk_tool dfx : uadk library dfx function, etc\n");
186184
printf("USAGE\n");
187185
printf(" uadk_tool dfx [--version] = Show library version\n");
188-
printf(" uadk_tool dfx [--date] = Show build date\n");
189186
printf(" uadk_tool dfx [--dir] = Show library dir\n");
190187
printf(" uadk_tool dfx [--env] = Show environment variables\n");
191188
printf(" uadk_tool dfx [--count] = Show the ctx message count\n");
@@ -204,12 +201,11 @@ void dfx_cmd_parse(int argc, char *argv[])
204201
int opt;
205202

206203
static struct option long_options[] = {
207-
{"version", no_argument, 0, 2},
208-
{"date", no_argument, 0, 3},
209-
{"dir", no_argument, 0, 4},
210-
{"env", required_argument, 0, 5},
211-
{"count", no_argument, 0, 6},
212-
{"help", no_argument, 0, 7},
204+
{"version", no_argument, 0, DISPLAY_VERSION},
205+
{"dir", no_argument, 0, DISPLAY_DIR},
206+
{"env", required_argument, 0, DISPLAY_ENV},
207+
{"count", no_argument, 0, DISPLAY_COUNT},
208+
{"help", no_argument, 0, DISPLAY_HELP},
213209
{0, 0, 0, 0}
214210
};
215211

@@ -222,9 +218,6 @@ void dfx_cmd_parse(int argc, char *argv[])
222218
case DISPLAY_VERSION:
223219
wd_get_version();
224220
break;
225-
case DISPLAY_DATE:
226-
uadk_build_date();
227-
break;
228221
case DISPLAY_DIR:
229222
uadk_exe_path();
230223
break;

0 commit comments

Comments
 (0)