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); exit(EXIT_FAILURE);
} }
if (madvise(pkt_buf, TAP_BUF_BYTES, MADV_HUGEPAGE)) madvise(pkt_buf, TAP_BUF_BYTES, MADV_HUGEPAGE);
perror("madvise");
__openlog(log_name, 0, LOG_DAEMON); __openlog(log_name, 0, LOG_DAEMON);