platform: merge do_change_link_result() into do_change_link()
There is only one caller left.
This commit is contained in:
@@ -4464,18 +4464,21 @@ retry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMPlatformError
|
static NMPlatformError
|
||||||
do_change_link_result (NMPlatform *platform,
|
do_change_link (NMPlatform *platform,
|
||||||
ChangeLinkType change_link_type,
|
ChangeLinkType change_link_type,
|
||||||
int ifindex,
|
int ifindex,
|
||||||
WaitForNlResponseResult seq_result,
|
struct nl_msg *nlmsg,
|
||||||
const ChangeLinkData *data)
|
const ChangeLinkData *data)
|
||||||
{
|
{
|
||||||
|
WaitForNlResponseResult seq_result;
|
||||||
char s_buf[256];
|
char s_buf[256];
|
||||||
NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
|
NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
|
||||||
NMLogLevel log_level = LOGL_DEBUG;
|
NMLogLevel log_level = LOGL_DEBUG;
|
||||||
const char *log_result = "failure", *log_detail = "";
|
const char *log_result = "failure", *log_detail = "";
|
||||||
const NMPObject *obj_cache;
|
const NMPObject *obj_cache;
|
||||||
|
|
||||||
|
seq_result = do_change_link_request (platform, ifindex, nlmsg);
|
||||||
|
|
||||||
if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) {
|
if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) {
|
||||||
log_result = "success";
|
log_result = "success";
|
||||||
} else if (NM_IN_SET (-((int) seq_result), EEXIST, EADDRINUSE)) {
|
} else if (NM_IN_SET (-((int) seq_result), EEXIST, EADDRINUSE)) {
|
||||||
@@ -4514,19 +4517,6 @@ do_change_link_result (NMPlatform *platform,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NMPlatformError
|
|
||||||
do_change_link (NMPlatform *platform,
|
|
||||||
ChangeLinkType change_link_type,
|
|
||||||
int ifindex,
|
|
||||||
struct nl_msg *nlmsg,
|
|
||||||
const ChangeLinkData *data)
|
|
||||||
{
|
|
||||||
WaitForNlResponseResult seq_result;
|
|
||||||
|
|
||||||
seq_result = do_change_link_request (platform, ifindex, nlmsg);
|
|
||||||
return do_change_link_result (platform, change_link_type, ifindex, seq_result, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
link_add (NMPlatform *platform,
|
link_add (NMPlatform *platform,
|
||||||
const char *name,
|
const char *name,
|
||||||
|
Reference in New Issue
Block a user