summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-07-11 07:58:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-07-11 07:58:34 +0200
commite77acea709fb64b64ab884f5e946738d326df970 (patch)
tree5ffae8d7af61072d94c170c82e317a502d7cd681 /include
parent4daa7a20c949e45ab9a93fd6ca7cb63bcebfb2ca (diff)
parente703d1ed730df92011f37692780b40fef110dd07 (diff)
downloadbarebox-e77acea709fb64b64ab884f5e946738d326df970.tar.gz
barebox-e77acea709fb64b64ab884f5e946738d326df970.tar.xz
Merge branch 'for-next/state'
Diffstat (limited to 'include')
-rw-r--r--include/libfile.h2
-rw-r--r--include/state.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/include/libfile.h b/include/libfile.h
index de4f42dbd1..dd0b00f988 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -1,7 +1,7 @@
#ifndef __LIBFILE_H
#define __LIBFILE_H
-int write_full(int fd, void *buf, size_t size);
+int write_full(int fd, const void *buf, size_t size);
int read_full(int fd, void *buf, size_t size);
char *read_file_line(const char *fmt, ...);
diff --git a/include/state.h b/include/state.h
index b3966fd99e..bc9a574093 100644
--- a/include/state.h
+++ b/include/state.h
@@ -10,13 +10,15 @@ int state_backend_dtb_file(struct state *state, const char *of_path,
int state_backend_raw_file(struct state *state, const char *of_path,
const char *path, off_t offset, size_t size);
-struct state *state_new_from_node(const char *name, struct device_node *node);
+struct state *state_new_from_node(struct device_node *node, char *path,
+ off_t offset, size_t max_size, bool readonly);
void state_release(struct state *state);
struct state *state_by_name(const char *name);
struct state *state_by_node(const struct device_node *node);
int state_get_name(const struct state *state, char const **name);
+int state_load(struct state *state);
int state_save(struct state *state);
void state_info(void);