1 // Copyright 2016 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 #include <stddef.h>
8 #include <stdint.h>
9 
10 // append a commandline string to the commandline
11 void cmdline_append(const char* str, size_t len);
12 
13 // add a commandline item to the commandline
14 // (replaces items with the same name)
15 void cmdline_set(const char* key, const char* val);
16 
17 // look up an item in the commandline
18 const char* cmdline_get(const char* key, const char* _default);
19 uint32_t cmdline_get_uint32(const char* key, uint32_t _default);
20 
21 // obtain the entire commandline as a string
22 size_t cmdline_to_string(char* ptr, size_t max);
23