summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-02-03 18:20:44 +0100
committerLubomir Rintel <lkundrak@v3.sk>2017-02-03 18:53:40 +0100
commit6404c79e4d6c62e85662162232fb624469693bcd (patch)
tree7cd0e3ac3927d77ec271ac844daba75662508565
parent55a5bf580dbb69eec825d5e5be7f0529de1acdcc (diff)
downloadNetworkManager-6404c79e4d6c62e85662162232fb624469693bcd.tar.gz
core: kill nm_spawn_process()
It's not used anymore. Which is a good thing, because if it was used we'd have to get rid of the uses. It did accept a whitespace separated string for an argument, which is never useful for us; it indicated error either on g_spawn_sync() failure or an error status code of the program spawned, but only set the error in the former case which had let to errors. The would would be a bit nicer place without it. (But not much)
-rw-r--r--src/nm-core-utils.c24
-rw-r--r--src/nm-core-utils.h2
2 files changed, 0 insertions, 26 deletions
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index 631540a17c..2f011105dd 100644
--- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c
@@ -367,30 +367,6 @@ nm_utils_array_remove_at_indexes (GArray *array, const guint *indexes_to_delete,
g_array_set_size (array, res_length);
}
-int
-nm_spawn_process (const char *args, GError **error)
-{
- GError *local = NULL;
- gint num_args;
- char **argv = NULL;
- int status = -1;
-
- g_return_val_if_fail (args != NULL, -1);
- g_return_val_if_fail (!error || !*error, -1);
-
- if (g_shell_parse_argv (args, &num_args, &argv, &local)) {
- g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &status, &local);
- g_strfreev (argv);
- }
-
- if (local) {
- nm_log_warn (LOGD_CORE, "could not spawn process '%s': %s", args, local->message);
- g_propagate_error (error, local);
- }
-
- return status;
-}
-
static const char *
_trunk_first_line (char *str)
{
diff --git a/src/nm-core-utils.h b/src/nm-core-utils.h
index ada3f8ef70..e039760e09 100644
--- a/src/nm-core-utils.h
+++ b/src/nm-core-utils.h
@@ -112,8 +112,6 @@ nm_utils_ip6_route_metric_normalize (guint32 metric)
return metric ? metric : 1024 /*NM_PLATFORM_ROUTE_METRIC_DEFAULT_IP6*/;
}
-int nm_spawn_process (const char *args, GError **error);
-
int nm_utils_modprobe (GError **error, gboolean suppress_error_loggin, const char *arg1, ...) G_GNUC_NULL_TERMINATED;
guint64 nm_utils_get_start_time_for_pid (pid_t pid, char *out_state, pid_t *out_ppid);