From 38e97ddeab325936f2498faeb3b6866f74cad285 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 15 Oct 2017 22:52:38 +0200 Subject: tools: retry resolution except when fatal The reference to this is , which mentions: "From the perspective of the application that calls getaddrinfo() it perhaps doesn't matter that much since EAI_FAIL, EAI_NONAME and EAI_NODATA are all permanent failure codes and the causes are all permanent failures in the sense that there is no point in retrying later." This should cover more early-boot situations. While we're at it, we clean up the logic a bit so that we don't have a retry message on the final non-retrying attempt. We also peer into errno when receiving EAI_SYSTEM, to report to the user what actually happened. Also, fix the quoting back tick front tick mess. --- src/tools/show.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/show.c') diff --git a/src/tools/show.c b/src/tools/show.c index 476d002..4203494 100644 --- a/src/tools/show.c +++ b/src/tools/show.c @@ -352,7 +352,7 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_int } else if (!strcmp(param, "dump")) dump_print(device, with_interface); else { - fprintf(stderr, "Invalid parameter: `%s`\n", param); + fprintf(stderr, "Invalid parameter: `%s'\n", param); show_usage(); return false; } -- cgit v1.2.3-59-g8ed1b