aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYizhan Xu <yizhan.xu@intel.com>2022-01-20 09:24:14 -0800
committerTony Luck <tony.luck@intel.com>2022-01-20 09:26:37 -0800
commitba225f30fb762d3a6be5b5f29ad3e52af7b1d70a (patch)
treedcba4caee9d396c30c2d7c1cecde2d3a2de8650a
parent493bfdf5e667d39b9044e4885bb6b41ce1888d0a (diff)
downloadras-tools-ba225f30fb762d3a6be5b5f29ad3e52af7b1d70a.tar.gz
vtop: Fix check on number of arguments
The number of arguments must be three. Signed-off-by: Yizhan Xu <yizhan.xu@intel.com>
-rw-r--r--vtop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vtop.c b/vtop.c
index 7ffcf36..04c7d32 100644
--- a/vtop.c
+++ b/vtop.c
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
int process_id;
unsigned long long buf, phys;
- if(argc < 2) {
+ if (argc != 3) {
printf("require virtual address and pid: 'vtop vaddress pid'\n");
return 1;
}