ifcfg-rh: remove unused keyfile argument from writer_update_connection()

writer_update_connection() retrieves the keyfile name based on the ifcfg-name.
No need to pass it in separately, the argument was unused.
This commit is contained in:
Thomas Haller 2016-11-06 14:11:04 +01:00
parent 1b03b59ac0
commit 01f0e35b69
4 changed files with 2 additions and 10 deletions

View file

@ -335,7 +335,6 @@ commit_changes (NMSettingsConnection *connection,
NMSettingsConnectionCommitFunc callback, NMSettingsConnectionCommitFunc callback,
gpointer user_data) gpointer user_data)
{ {
NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE ((NMIfcfgConnection *) connection);
GError *error = NULL; GError *error = NULL;
NMConnection *reread; NMConnection *reread;
gboolean same = FALSE, success = FALSE; gboolean same = FALSE, success = FALSE;
@ -369,7 +368,6 @@ commit_changes (NMSettingsConnection *connection,
success = writer_update_connection (NM_CONNECTION (connection), success = writer_update_connection (NM_CONNECTION (connection),
IFCFG_DIR, IFCFG_DIR,
filename, filename,
priv->keyfile,
&error); &error);
} else { } else {
success = writer_new_connection (NM_CONNECTION (connection), success = writer_new_connection (NM_CONNECTION (connection),

View file

@ -2700,7 +2700,6 @@ static gboolean
write_connection (NMConnection *connection, write_connection (NMConnection *connection,
const char *ifcfg_dir, const char *ifcfg_dir,
const char *filename, const char *filename,
const char *keyfile,
char **out_filename, char **out_filename,
GError **error) GError **error)
{ {
@ -2884,14 +2883,13 @@ writer_new_connection (NMConnection *connection,
char **out_filename, char **out_filename,
GError **error) GError **error)
{ {
return write_connection (connection, ifcfg_dir, NULL, NULL, out_filename, error); return write_connection (connection, ifcfg_dir, NULL, out_filename, error);
} }
gboolean gboolean
writer_update_connection (NMConnection *connection, writer_update_connection (NMConnection *connection,
const char *ifcfg_dir, const char *ifcfg_dir,
const char *filename, const char *filename,
const char *keyfile,
GError **error) GError **error)
{ {
if (utils_has_complex_routes (filename)) { if (utils_has_complex_routes (filename)) {
@ -2900,6 +2898,6 @@ writer_update_connection (NMConnection *connection,
return FALSE; return FALSE;
} }
return write_connection (connection, ifcfg_dir, filename, keyfile, NULL, error); return write_connection (connection, ifcfg_dir, filename, NULL, error);
} }

View file

@ -34,7 +34,6 @@ gboolean writer_new_connection (NMConnection *connection,
gboolean writer_update_connection (NMConnection *connection, gboolean writer_update_connection (NMConnection *connection,
const char *ifcfg_dir, const char *ifcfg_dir,
const char *filename, const char *filename,
const char *keyfile,
GError **error); GError **error);
#endif /* _WRITER_H_ */ #endif /* _WRITER_H_ */

View file

@ -1780,7 +1780,6 @@ test_clear_master (void)
success = writer_update_connection (connection, success = writer_update_connection (connection,
TEST_SCRATCH_DIR "/network-scripts/", TEST_SCRATCH_DIR "/network-scripts/",
testfile, testfile,
NULL,
&error); &error);
nmtst_assert_success (success, error); nmtst_assert_success (success, error);
keyfile = utils_get_keys_path (testfile); keyfile = utils_get_keys_path (testfile);
@ -6244,7 +6243,6 @@ test_write_wifi_wpa_then_open (void)
success = writer_update_connection (connection, success = writer_update_connection (connection,
TEST_SCRATCH_DIR "/network-scripts/", TEST_SCRATCH_DIR "/network-scripts/",
testfile, testfile,
keyfile,
&error); &error);
g_assert_no_error (error); g_assert_no_error (error);
g_assert (success); g_assert (success);
@ -6392,7 +6390,6 @@ test_write_wifi_wpa_then_wep_with_perms (void)
success = writer_update_connection (connection, success = writer_update_connection (connection,
TEST_SCRATCH_DIR "/network-scripts/", TEST_SCRATCH_DIR "/network-scripts/",
testfile, testfile,
keyfile,
&error); &error);
g_assert_no_error (error); g_assert_no_error (error);
g_assert (success); g_assert (success);