Skip to content

Commit 170b3df

Browse files
committed
Improve error messages
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
1 parent 4a68866 commit 170b3df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bind.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ gt_setup_secretkey(struct mud *mud, const char *keyfile)
7272
close(fd);
7373

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

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

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

100100
return mtu;
101101
}
@@ -174,7 +174,7 @@ gt_bind(int argc, char **argv)
174174
size_t mtu = gt_setup_mtu(mud, 0, tun_name);
175175

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

0 commit comments

Comments
 (0)