summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-kernel-args.h
blob: 0bc43704a57dc4215aaeac76321165d206696718 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * Copyright (C) 2013,2014 Colin Walters <walters@verbum.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2 of the licence or (at
 * your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#pragma once

#include "libglnx.h"

G_BEGIN_DECLS

typedef struct _OstreeKernelArgs OstreeKernelArgs;
void _ostree_kernel_args_free (OstreeKernelArgs *kargs);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OstreeKernelArgs, _ostree_kernel_args_free);

OstreeKernelArgs *_ostree_kernel_args_new (void);
void _ostree_kernel_args_replace_take (OstreeKernelArgs  *kargs,
                                       char              *key);
void _ostree_kernel_args_replace (OstreeKernelArgs  *kargs,
                                  const char        *key);
void _ostree_kernel_args_replace_argv (OstreeKernelArgs  *kargs,
                                       char             **argv);
void _ostree_kernel_args_append (OstreeKernelArgs  *kargs,
                                 const char     *key);
void _ostree_kernel_args_append_argv (OstreeKernelArgs  *kargs,
                                      char **argv);
void _ostree_kernel_args_append_argv_filtered (OstreeKernelArgs  *kargs,
                                               char **argv,
                                               char **prefixes);

gboolean _ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs,
                                                  GCancellable     *cancellable,
                                                  GError          **error);

void _ostree_kernel_args_parse_append (OstreeKernelArgs *kargs,
                                       const char *options);

const char *_ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key);

OstreeKernelArgs * _ostree_kernel_args_from_string (const char *options);

char ** _ostree_kernel_args_to_strv (OstreeKernelArgs *kargs);
char * _ostree_kernel_args_to_string (OstreeKernelArgs *kargs);

G_END_DECLS