api: do not truncate api dump file size 22/28322/1
authorBenoît Ganne <bganne@cisco.com>
Tue, 21 Jan 2020 17:35:49 +0000 (18:35 +0100)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 12 Aug 2020 15:59:46 +0000 (15:59 +0000)
Type: fix

Change-Id: I5c81d2f55057f5fba780cb12154a3fb1aef79f20
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit aba4983ad48374a50cd93ba91f66be241f210279)

src/vlibmemory/vlib_api_cli.c

index 33bea78..784b890 100755 (executable)
@@ -430,7 +430,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
     }
 
   file_size = statb.st_size;
-  file_size = (file_size + 4095) & ~(4096);
+  file_size = (file_size + 4095) & ~(4095);
 
   hp = mmap (0, file_size, PROT_READ, MAP_PRIVATE, fd, 0);