Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
  • Loading branch information
angt committed Jun 27, 2019
1 parent 4a68866 commit 170b3df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ gt_setup_secretkey(struct mud *mud, const char *keyfile)
close(fd);

if (size != sizeof(buf)) {
gt_log("unable to read secret key\n");
gt_log("couldn't read secret key\n");
return -1;
}

Expand All @@ -95,7 +95,7 @@ gt_setup_mtu(struct mud *mud, size_t old, const char *tun_name)
return mtu;

if (iface_set_mtu(tun_name, mtu) == -1)
perror("tun_set_mtu");
gt_log("couldn't setup MTU at %zu on device %s\n", mtu, tun_name);

return mtu;
}
Expand Down Expand Up @@ -174,7 +174,7 @@ gt_bind(int argc, char **argv)
size_t mtu = gt_setup_mtu(mud, 0, tun_name);

if (tun_set_persist(tun_fd, persist) == -1) {
gt_log("unable to %sable persist mode on device %s\n",
gt_log("couldn't %sable persist mode on device %s\n",
persist ? "en" : "dis", tun_name);
}

Expand Down

0 comments on commit 170b3df

Please sign in to comment.