aboutsummaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-12-04 14:26:15 +1100
committerJon Loeliger <jdl@freescale.com>2007-12-04 07:54:03 -0600
commit92cb9a25b1a9117f4dacb0bce8c16b90b73b8698 (patch)
treefee6764026b45208e0f11e5066930b002b307e14 /dtc.h
parent2d72816ccfdcfd8039ab0b8883f9eeac895984bb (diff)
downloaddtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.zip
dtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.tar.gz
dtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.tar.bz2
dtc: Add many const qualifications
This adds 'const' qualifiers to many variables and functions. In particular it's now used for passing names to the tree accesor functions. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/dtc.h b/dtc.h
index 00a9431..330e274 100644
--- a/dtc.h
+++ b/dtc.h
@@ -134,14 +134,14 @@ void data_free(struct data d);
struct data data_grow_for(struct data d, int xlen);
-struct data data_copy_mem(char *mem, int len);
-struct data data_copy_escape_string(char *s, int len);
+struct data data_copy_mem(const char *mem, int len);
+struct data data_copy_escape_string(const char *s, int len);
struct data data_copy_file(FILE *f, size_t len);
-struct data data_append_data(struct data d, void *p, int len);
+struct data data_append_data(struct data d, const void *p, int len);
struct data data_merge(struct data d1, struct data d2);
struct data data_append_cell(struct data d, cell_t word);
-struct data data_append_re(struct data d, struct fdt_reserve_entry *re);
+struct data data_append_re(struct data d, const struct fdt_reserve_entry *re);
struct data data_append_addr(struct data d, u64 addr);
struct data data_append_byte(struct data d, uint8_t byte);
struct data data_append_zeroes(struct data d, int len);
@@ -200,14 +200,14 @@ struct node *chain_node(struct node *first, struct node *list);
void add_property(struct node *node, struct property *prop);
void add_child(struct node *parent, struct node *child);
-char *get_unitname(struct node *node);
-struct property *get_property(struct node *node, char *propname);
+const char *get_unitname(struct node *node);
+struct property *get_property(struct node *node, const char *propname);
cell_t propval_cell(struct property *prop);
-struct node *get_subnode(struct node *node, char *nodename);
-struct node *get_node_by_path(struct node *tree, char *path);
+struct node *get_subnode(struct node *node, const char *nodename);
+struct node *get_node_by_path(struct node *tree, const char *path);
struct node *get_node_by_label(struct node *tree, const char *label);
struct node *get_node_by_phandle(struct node *tree, cell_t phandle);
-struct node *get_node_by_ref(struct node *tree, char *ref);
+struct node *get_node_by_ref(struct node *tree, const char *ref);
cell_t get_node_phandle(struct node *root, struct node *node);
/* Boot info (tree plus memreserve information */
@@ -256,11 +256,11 @@ struct boot_info *dt_from_source(const char *f);
/* FS trees */
-struct boot_info *dt_from_fs(char *dirname);
+struct boot_info *dt_from_fs(const char *dirname);
/* misc */
-char *join_path(char *path, char *name);
-void fill_fullpaths(struct node *tree, char *prefix);
+char *join_path(const char *path, const char *name);
+void fill_fullpaths(struct node *tree, const char *prefix);
#endif /* _DTC_H */