Commit 5b08d385 authored by Prashant Bhole's avatar Prashant Bhole Committed by Brenden Blanco

libbpf: print error to error stream

making it consistent with rest of the code
parent e9fa659e
......@@ -425,7 +425,7 @@ int bpf_open_raw_sock(const char *name)
sock = socket(PF_PACKET, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, htons(ETH_P_ALL));
if (sock < 0) {
printf("cannot create raw socket\n");
fprintf(stderr, "cannot create raw socket\n");
return -1;
}
......@@ -439,7 +439,7 @@ int bpf_open_raw_sock(const char *name)
}
sll.sll_protocol = htons(ETH_P_ALL);
if (bind(sock, (struct sockaddr *)&sll, sizeof(sll)) < 0) {
printf("bind to %s: %s\n", name, strerror(errno));
fprintf(stderr, "bind to %s: %s\n", name, strerror(errno));
close(sock);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment