diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2014-09-23 11:16:53 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2014-09-26 10:40:37 -0400 |
commit | 262cba09c0bfdcd5f13dea63369b451d817d871f (patch) | |
tree | 4b33a9b1ab514071698de6849eb9f4cf6ac5ee79 /src/ostree/ot-admin-builtin-deploy.c | |
parent | edf9cf5a7f0a44895cc3fc0918b427283d129b25 (diff) | |
download | ostree-262cba09c0bfdcd5f13dea63369b451d817d871f.tar.gz |
ostree admin instutil set-kargs: make more flexible
Add command line arguments:
--import-proc-cmdline: import values from /proc/cmdline
--merge: import current values
--replace=ARG=VALUE: replace value
--append=ARG=VALUE: append a new argument
Extra command line arguments are treated like --append=, which
gives backwards compatibility.
https://bugzilla.gnome.org/show_bug.cgi?id=731051
Diffstat (limited to 'src/ostree/ot-admin-builtin-deploy.c')
-rw-r--r-- | src/ostree/ot-admin-builtin-deploy.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c index a209c26f..d255f8b8 100644 --- a/src/ostree/ot-admin-builtin-deploy.c +++ b/src/ostree/ot-admin-builtin-deploy.c @@ -130,20 +130,8 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeSysroot *sysroot, GCancell */ if (opt_kernel_proc_cmdline) { - gs_unref_object GFile *proc_cmdline_path = g_file_new_for_path ("/proc/cmdline"); - gs_free char *proc_cmdline = NULL; - gsize proc_cmdline_len = 0; - gs_strfreev char **proc_cmdline_args = NULL; - - if (!g_file_load_contents (proc_cmdline_path, cancellable, - &proc_cmdline, &proc_cmdline_len, - NULL, error)) + if (!_ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error)) goto out; - - g_strchomp (proc_cmdline); - - proc_cmdline_args = g_strsplit (proc_cmdline, " ", -1); - _ostree_kernel_args_append_argv (kargs, proc_cmdline_args); } else if (merge_deployment) { |