Rename override to overwrite for config_load_session
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 9 Sep 2016 16:37:37 +0000 (12:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Oct 2016 04:44:05 +0000 (00:44 -0400)
This rename is to be consistent with the load API doc and interface.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/config/session-config.c
src/common/config/session-config.h

index 503f49fad8ce441586e4473c01ca6bd9de488c0e..d53ec0aa530ae88201932675c2bcb7e6b6dff719 100644 (file)
@@ -2395,7 +2395,7 @@ end:
 
 static
 int process_session_node(xmlNodePtr session_node, const char *session_name,
-               int override)
+               int overwrite)
 {
        int ret, started = -1, snapshot_mode = -1;
        uint64_t live_timer_interval = UINT64_MAX;
@@ -2570,7 +2570,7 @@ domain_init_error:
                goto error;
        }
 
-       if (override) {
+       if (overwrite) {
                /* Destroy session if it exists */
                ret = lttng_destroy_session((const char *) name);
                if (ret && ret != -LTTNG_ERR_SESS_NOT_FOUND) {
@@ -2665,7 +2665,7 @@ valid:
 
 static
 int load_session_from_file(const char *path, const char *session_name,
-       struct session_config_validation_ctx *validation_ctx, int override)
+       struct session_config_validation_ctx *validation_ctx, int overwrite)
 {
        int ret, session_found = !session_name;
        xmlDocPtr doc = NULL;
@@ -2707,7 +2707,7 @@ int load_session_from_file(const char *path, const char *session_name,
                session_node; session_node =
                        xmlNextElementSibling(session_node)) {
                ret = process_session_node(session_node,
-                       session_name, override);
+                       session_name, overwrite);
                if (session_name && ret == 0) {
                        /* Target session found and loaded */
                        session_found = 1;
@@ -2741,7 +2741,7 @@ struct dirent *alloc_dirent(const char *path)
 
 static
 int load_session_from_path(const char *path, const char *session_name,
-       struct session_config_validation_ctx *validation_ctx, int override)
+       struct session_config_validation_ctx *validation_ctx, int overwrite)
 {
        int ret, session_found = !session_name;
        DIR *directory = NULL;
@@ -2816,7 +2816,7 @@ int load_session_from_path(const char *path, const char *session_name,
                        file_path[path_len + file_name_len] = '\0';
 
                        ret = load_session_from_file(file_path, session_name,
-                               validation_ctx, override);
+                               validation_ctx, overwrite);
                        if (session_name && !ret) {
                                session_found = 1;
                                break;
@@ -2827,7 +2827,7 @@ int load_session_from_path(const char *path, const char *session_name,
                free(file_path);
        } else {
                ret = load_session_from_file(path, session_name,
-                       validation_ctx, override);
+                       validation_ctx, overwrite);
                if (ret) {
                        goto end;
                } else {
@@ -2885,7 +2885,7 @@ invalid:
 
 LTTNG_HIDDEN
 int config_load_session(const char *path, const char *session_name,
-               int override, unsigned int autoload)
+               int overwrite, unsigned int autoload)
 {
        int ret;
        bool session_loaded = false;
@@ -2939,7 +2939,7 @@ int config_load_session(const char *path, const char *session_name,
                        }
                        if (path_ptr) {
                                ret = load_session_from_path(path_ptr, session_name,
-                                               &validation_ctx, override);
+                                               &validation_ctx, overwrite);
                                if (ret && ret != -LTTNG_ERR_LOAD_SESSION_NOENT) {
                                        goto end;
                                }
@@ -2969,7 +2969,7 @@ int config_load_session(const char *path, const char *session_name,
 
                if (path_ptr) {
                        ret = load_session_from_path(path_ptr, session_name,
-                                       &validation_ctx, override);
+                                       &validation_ctx, overwrite);
                        if (!ret) {
                                session_loaded = true;
                        }
@@ -2994,7 +2994,7 @@ int config_load_session(const char *path, const char *session_name,
                }
 
                ret = load_session_from_path(path, session_name,
-                       &validation_ctx, override);
+                       &validation_ctx, overwrite);
        }
 end:
        fini_session_config_validation_ctx(&validation_ctx);
index 939cb6cbf0ff1cd4e76e2c819ffc2e178e241bbd..c4e4797e5c7c0fcf6166126ee6cdd4839cda16aa 100644 (file)
@@ -215,7 +215,7 @@ int config_writer_write_element_string(struct config_writer *writer,
  * session_name Name of the session to load. Will load all
  * sessions from path if NULL.
  *
- * override Override current session configuration if it exists.
+ * overwrite Overwrite current session configuration if it exists.
  * autoload Tell to load the auto session(s).
  *
  * Returns zero if the session could be loaded successfully. Returns
@@ -223,6 +223,6 @@ int config_writer_write_element_string(struct config_writer *writer,
  */
 LTTNG_HIDDEN
 int config_load_session(const char *path, const char *session_name,
-               int override, unsigned int autoload);
+               int overwrite, unsigned int autoload);
 
 #endif /* _CONFIG_H */
This page took 0.04387 seconds and 4 git commands to generate.