1
0
mirror of https://passt.top/passt synced 2024-12-22 21:55:22 +00:00

passt: Don't warn on failed madvise()

A kernel might not be configured with CONFIG_TRANSPARENT_HUGEPAGE,
especially on embedded systems. Ignore the error, it doesn't affect
functionality.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2022-02-26 23:37:05 +01:00
parent 6dc1ec3c7a
commit a095fbc457

View File

@ -339,8 +339,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
if (madvise(pkt_buf, TAP_BUF_BYTES, MADV_HUGEPAGE))
perror("madvise");
madvise(pkt_buf, TAP_BUF_BYTES, MADV_HUGEPAGE);
__openlog(log_name, 0, LOG_DAEMON);