platform: remove log_result from do_change_link()

It conveys no useful information beyond what
wait_for_nl_response_to_string() returns.
This commit is contained in:
Lubomir Rintel 2023-01-16 08:12:33 +01:00
parent 3f6d040274
commit ad659de3ba

View file

@ -8157,7 +8157,6 @@ do_change_link(NMPlatform *platform,
char s_buf[256]; char s_buf[256];
int result = 0; int result = 0;
NMLogLevel log_level = LOGL_DEBUG; NMLogLevel log_level = LOGL_DEBUG;
const char *log_result = "failure";
const char *log_detail = ""; const char *log_detail = "";
gs_free char *log_detail_free = NULL; gs_free char *log_detail_free = NULL;
const NMPObject *obj_cache; const NMPObject *obj_cache;
@ -8191,9 +8190,7 @@ retry:
goto retry; goto retry;
} }
if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) { if (NM_IN_SET(seq_result, WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK, -EEXIST, -EADDRINUSE)) {
log_result = "success";
} else if (NM_IN_SET(seq_result, -EEXIST, -EADDRINUSE)) {
/* */ /* */
} else if (NM_IN_SET(seq_result, -ESRCH, -ENOENT)) { } else if (NM_IN_SET(seq_result, -ESRCH, -ENOENT)) {
log_detail = ", firmware not found"; log_detail = ", firmware not found";
@ -8210,7 +8207,6 @@ retry:
== 0) { == 0) {
/* work around ENFILE which may be wrongly returned (bgo #770456). /* work around ENFILE which may be wrongly returned (bgo #770456).
* If the MAC address is as expected, assume success? */ * If the MAC address is as expected, assume success? */
log_result = "success";
log_detail = " (assume success changing address)"; log_detail = " (assume success changing address)";
result = 0; result = 0;
} else if (NM_IN_SET(seq_result, -ENODEV)) { } else if (NM_IN_SET(seq_result, -ENODEV)) {
@ -8226,9 +8222,8 @@ retry:
out: out:
_NMLOG(log_level, _NMLOG(log_level,
"do-change-link[%d]: %s changing link: %s%s", "do-change-link[%d]: %s%s",
ifindex, ifindex,
log_result,
wait_for_nl_response_to_string(seq_result, errmsg, s_buf, sizeof(s_buf)), wait_for_nl_response_to_string(seq_result, errmsg, s_buf, sizeof(s_buf)),
log_detail); log_detail);
return result; return result;