summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-07-22 21:56:05 +0200
committerThomas Haller <thaller@redhat.com>2019-07-25 22:02:00 +0200
commite32d80ea29ecbdef29f0ca6eb0b232d389bc3170 (patch)
tree77dd58b90130e3ddf2b0fbab29b1e44741ea2711
parent10353a996f752af03000497160e3abce1b4c8477 (diff)
downloadNetworkManager-e32d80ea29ecbdef29f0ca6eb0b232d389bc3170.tar.gz
settings/trivial: rename NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK to NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK
NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK really directly corresponds to NM_SETTINGS_UPDATE2_FLAG_TO_DISK. Rename, so that this is better reflected.
-rw-r--r--src/nm-checkpoint.c2
-rw-r--r--src/nm-manager.c4
-rw-r--r--src/settings/nm-settings-connection.c2
-rw-r--r--src/settings/nm-settings-connection.h2
-rw-r--r--src/settings/nm-settings.c14
5 files changed, 12 insertions, 12 deletions
diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c
index 1f7723c539..9bc979bb94 100644
--- a/src/nm-checkpoint.c
+++ b/src/nm-checkpoint.c
@@ -254,7 +254,7 @@ restore_and_activate_connection (NMCheckpoint *self,
_LOGD ("rollback: adding connection %s again",
nm_connection_get_uuid (dev_checkpoint->settings_connection));
- persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK;
+ persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK;
if (!nm_settings_add_connection (NM_SETTINGS_GET,
dev_checkpoint->settings_connection,
persist_mode,
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 4f114e4d13..6ea535021a 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -5454,7 +5454,7 @@ impl_manager_add_and_activate_connection (NMDBusObject *obj,
const char *device_path;
const char *specific_object_path;
gs_free NMConnection **conns = NULL;
- NMSettingsConnectionPersistMode persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK;
+ NMSettingsConnectionPersistMode persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK;
gboolean is_volatile = FALSE;
gboolean bind_dbus_client = FALSE;
AsyncOpType async_op_type;
@@ -5485,7 +5485,7 @@ impl_manager_add_and_activate_connection (NMDBusObject *obj,
s = g_variant_get_string (option_value, NULL);
is_volatile = FALSE;
- persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK;
+ persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK;
if (nm_streq (s, "volatile")) {
persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_ONLY;
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index 2093342c9c..f042feac52 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -1505,7 +1505,7 @@ update_auth_cb (NMSettingsConnection *self,
}
if (NM_FLAGS_HAS (info->flags, NM_SETTINGS_UPDATE2_FLAG_TO_DISK))
- persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK;
+ persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK;
else if (NM_FLAGS_ANY (info->flags, NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY
| NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED))
persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED;
diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
index ab23dc1ff5..ee58919abc 100644
--- a/src/settings/nm-settings-connection.h
+++ b/src/settings/nm-settings-connection.h
@@ -87,7 +87,7 @@ typedef enum {
/* persist to disk. If the profile is currenly in-memory, remove
* it from /run. */
- NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK,
+ NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK,
/* persist to /run (in-memory). If the profile is currently on disk,
* delete it from disk. */
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index 6961134c6c..66858ed99b 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -1404,7 +1404,7 @@ nm_settings_add_connection (NMSettings *self,
const char *uuid;
StorageData *sd;
- nm_assert (NM_IN_SET (persist_mode, NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK,
+ nm_assert (NM_IN_SET (persist_mode, NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK,
NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_ONLY));
nm_assert (!NM_FLAGS_ANY (sett_flags, ~_NM_SETTINGS_CONNECTION_INT_FLAGS_PERSISTENT_MASK));
@@ -1448,7 +1448,7 @@ nm_settings_add_connection (NMSettings *self,
if (!_add_connection_to_first_plugin (self,
connection,
- ( persist_mode != NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK
+ ( persist_mode != NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK
|| NM_FLAGS_ANY (sett_flags, NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE
| NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED)),
NM_FLAGS_HAS (sett_flags, NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED),
@@ -1539,7 +1539,7 @@ nm_settings_update_connection (NMSettings *self,
nm_assert (!NM_FLAGS_ANY (sett_flags, ~sett_mask));
nm_assert (NM_IN_SET (persist_mode, NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP,
NM_SETTINGS_CONNECTION_PERSIST_MODE_NO_PERSIST,
- NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK,
+ NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK,
NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED,
NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_ONLY));
@@ -1582,7 +1582,7 @@ nm_settings_update_connection (NMSettings *self,
if (persist_mode == NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP) {
persist_mode = cur_in_memory
? NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED
- : NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK;
+ : NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK;
}
if ( NM_FLAGS_HAS (sett_mask, NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED)
@@ -1606,7 +1606,7 @@ nm_settings_update_connection (NMSettings *self,
NM_SETTINGS_CONNECTION_PERSIST_MODE_NO_PERSIST)) {
/* making a default-wired-connection a regulard connection implies persisting
* it to disk (unless specified differently). */
- persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK;
+ persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK;
}
}
}
@@ -1624,7 +1624,7 @@ nm_settings_update_connection (NMSettings *self,
persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED;
}
- if (persist_mode == NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK)
+ if (persist_mode == NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK)
new_in_memory = FALSE;
else if (NM_IN_SET (persist_mode, NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED,
NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_ONLY))
@@ -2164,7 +2164,7 @@ settings_add_connection_helper (NMSettings *self,
}
if (NM_FLAGS_HAS (flags, NM_SETTINGS_ADD_CONNECTION2_FLAG_TO_DISK))
- persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK;
+ persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK;
else {
nm_assert (NM_FLAGS_HAS (flags, NM_SETTINGS_ADD_CONNECTION2_FLAG_IN_MEMORY));
persist_mode = NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_ONLY;