blob: 0c14b5c31322c4811be274570fd27ee8618b3373 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_FIRMWARE_GIGABOOT_SRC_CMDLINE_H_
#define SRC_FIRMWARE_GIGABOOT_SRC_CMDLINE_H_
#include <stddef.h>
#include <stdint.h>
#include <zircon/compiler.h>
__BEGIN_CDECLS
// append a commandline string to the commandline
void cmdline_append(const char* str, size_t len);
// add a commandline item to the commandline
// (replaces items with the same name)
void cmdline_set(const char* key, const char* val);
// look up an item in the commandline
const char* cmdline_get(const char* key, const char* _default);
uint32_t cmdline_get_uint32(const char* key, uint32_t _default);
// obtain the entire commandline as a string
size_t cmdline_to_string(char* ptr, size_t max);
// append any load option arguments to the command line
void cmdline_append_load_options(void);
// Clears the commandline.
void cmdline_clear(void);
__END_CDECLS
#endif // SRC_FIRMWARE_GIGABOOT_SRC_CMDLINE_H_