Skip to content

Commit 5042ba6

Browse files
KaigeFulijinxia
authored andcommitted
tools: acrntrace: Change option -t to -i
Option -i is more suitable for interval. Meanwhile, we will use option -t for timeout in later patch. Signed-off-by: Kaige Fu <kaige.fu@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
1 parent b04e799 commit 5042ba6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tools/acrntrace/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ output to trace file under ``/tmp/acrntrace`` with raw (binary) data format.
1818
Options:
1919

2020
-h print this message
21-
-t period specify polling interval in milliseconds [1-999]
21+
-i period specify polling interval in milliseconds [1-999]
2222
-c clear the buffered old data
2323
-r minimal amount (in MB) of free space kept on the disk
2424
before acrntrace stops

tools/acrntrace/acrntrace.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static int exiting = 0;
2424

2525
/* for opt */
2626
static uint64_t period = 10000;
27-
static const char optString[] = "t:hcr:";
27+
static const char optString[] = "i:hcr:";
2828
static const char dev_name[] = "/dev/acrn_trace";
2929

3030
static uint32_t flags;
@@ -36,12 +36,12 @@ static int pcpu_num = 0;
3636
static void display_usage(void)
3737
{
3838
printf("acrntrace - tool to collect ACRN trace data\n"
39-
"[Usage] acrntrace [-t] [period in msec] [-ch]\n\n"
39+
"[Usage] acrntrace [-i] [period in msec] [-ch]\n\n"
4040
"[Options]\n"
4141
"\t-h: print this message\n"
4242
"\t-r: minimal amount (in MB) of free space kept on the disk\n"
4343
"\t before acrntrace stops\n"
44-
"\t-t: period_in_ms: specify polling interval [1-999]\n"
44+
"\t-i: period_in_ms: specify polling interval [1-999]\n"
4545
"\t-c: clear the buffered old data\n");
4646
}
4747

@@ -51,10 +51,10 @@ static int parse_opt(int argc, char *argv[])
5151

5252
while ((opt = getopt(argc, argv, optString)) != -1) {
5353
switch (opt) {
54-
case 't':
54+
case 'i':
5555
ret = atoi(optarg);
5656
if (ret <= 0 || ret >=1000) {
57-
pr_err("'-t' require integer between [1-999]\n");
57+
pr_err("'-i' require integer between [1-999]\n");
5858
return -EINVAL;
5959
}
6060
period = ret * 1000;

0 commit comments

Comments
 (0)