fprintf/stderr fixes from mainline #3998

This commit is contained in:
netblue30 2021-02-24 13:47:33 -05:00
parent e43bc70f26
commit 9c4b220c8a
3 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ static void mkdir_recursive(char *path) {
struct stat s;
if (chdir("/")) {
fprintf(stderr, "Error: can't chdir to /");
fprintf(stderr, "Error: can't chdir to /\n");
return;
}
@ -63,7 +63,7 @@ static void mkdir_recursive(char *path) {
return;
}
if (chdir(subdir)) {
fprintf(stderr, "Error: can't chdir to %s", subdir);
fprintf(stderr, "Error: can't chdir to %s\n", subdir);
return;
}

View file

@ -297,7 +297,7 @@ static void check_network(Bridge *br) {
else if (br->ipsandbox) { // for macvlan check network range
char *rv = in_netrange(br->ipsandbox, br->ip, br->mask);
if (rv) {
fprintf(stderr, "%s", rv);
fprintf(stderr, "%s\n", rv);
exit(1);
}
}

View file

@ -120,7 +120,7 @@ void net_configure_sandbox_ip(Bridge *br) {
// check network range
char *rv = in_netrange(br->ipsandbox, br->ip, br->mask);
if (rv) {
fprintf(stderr, "%s", rv);
fprintf(stderr, "%s\n", rv);
exit(1);
}
// send an ARP request and check if there is anybody on this IP address