1use libc::{c_char, c_int, c_void};
2
3#[repr(C)]
4pub struct uboot_ctx {
5 _private: [u8; 0],
6}
7
8unsafe extern "C" {
9 pub fn libuboot_initialize(
11 ctx: *mut *mut uboot_ctx,
12 config: *const c_char,
13 ) -> c_int;
14
15 pub fn libuboot_exit(ctx: *mut uboot_ctx);
17
18 pub fn libuboot_get_env(
20 ctx: *mut uboot_ctx,
21 name: *const c_char,
22 ) -> *const c_char;
23
24 pub fn libuboot_set_env(
26 ctx: *mut uboot_ctx,
27 name: *const c_char,
28 value: *const c_char,
29 ) -> c_int;
30
31 pub fn libuboot_save(ctx: *mut uboot_ctx) -> c_int;
33
34 pub fn libuboot_del_env(
36 ctx: *mut uboot_ctx,
37 name: *const c_char,
38 ) -> c_int;
39
40 pub fn libuboot_get_next(
42 ctx: *mut uboot_ctx,
43 prev: *mut *mut i8,
44 ) -> *mut i8;
45}