aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-12-02 09:37:09 -0600
committerAvi Kivity <avi@redhat.com>2008-12-03 13:03:33 +0200
commitbc07c2cc73cd11d103ea40f93f29e6c81479f7c9 (patch)
tree6bab130a547266499ff48627bb6e83bbafffbad5
parent07cd271c829913ee8556147d96318cf71944a7e2 (diff)
Ppc: fix build warningskvm-80rc1
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--hw/device_tree.c14
-rw-r--r--hw/device_tree.h12
2 files changed, 13 insertions, 13 deletions
diff --git a/hw/device_tree.c b/hw/device_tree.c
index e73129d41..2621ff112 100644
--- a/hw/device_tree.c
+++ b/hw/device_tree.c
@@ -31,7 +31,7 @@
/* This function reads device-tree property files that are of
* a single cell size
*/
-uint32_t read_proc_dt_prop_cell(char *path_in_device_tree)
+uint32_t read_proc_dt_prop_cell(const char *path_in_device_tree)
{
char *buf = NULL;
int i;
@@ -65,7 +65,7 @@ uint32_t read_proc_dt_prop_cell(char *path_in_device_tree)
#ifdef CONFIG_LIBFDT
/* support functions */
-static int get_offset_of_node(void *fdt, char *node_path)
+static int get_offset_of_node(void *fdt, const char *node_path)
{
int node_offset;
node_offset = fdt_path_offset(fdt, node_path);
@@ -78,7 +78,7 @@ static int get_offset_of_node(void *fdt, char *node_path)
}
/* public functions */
-void *load_device_tree(char *filename_path, unsigned long load_addr)
+void *load_device_tree(const char *filename_path, unsigned long load_addr)
{
int dt_file_size;
int dt_file_load_size;
@@ -134,7 +134,7 @@ fail:
return NULL;
}
-void dump_device_tree_to_file(void *fdt, char *filename)
+void dump_device_tree_to_file(void *fdt, const char *filename)
{
int fd;
fd = open(filename, O_RDWR|O_CREAT, O_RDWR);
@@ -148,7 +148,7 @@ void dump_device_tree_to_file(void *fdt, char *filename)
close(fd);
}
-void dt_cell(void *fdt, char *node_path, char *property,
+void dt_cell(void *fdt, const char *node_path, const char *property,
uint32_t val)
{
int offset;
@@ -163,7 +163,7 @@ void dt_cell(void *fdt, char *node_path, char *property,
}
/* This function is to manipulate a cell with multiple values */
-void dt_cell_multi(void *fdt, char *node_path, char *property,
+void dt_cell_multi(void *fdt, const char *node_path, const char *property,
uint32_t *val_array, int size)
{
int offset;
@@ -177,7 +177,7 @@ void dt_cell_multi(void *fdt, char *node_path, char *property,
}
}
-void dt_string(void *fdt, char *node_path, char *property,
+void dt_string(void *fdt, const char *node_path, const char *property,
char *string)
{
int offset;
diff --git a/hw/device_tree.h b/hw/device_tree.h
index 05a81ef70..a3113095b 100644
--- a/hw/device_tree.h
+++ b/hw/device_tree.h
@@ -11,16 +11,16 @@
*/
/* device-tree proc support functions */
-uint32_t read_proc_dt_prop_cell(char *path_in_device_tree);
+uint32_t read_proc_dt_prop_cell(const char *path_in_device_tree);
#ifdef CONFIG_LIBFDT
/* device tree functions */
-void *load_device_tree(char *filename_path, target_ulong load_addr);
-void dump_device_tree_to_file(void *fdt, char *filename);
-void dt_cell(void *fdt, char *node_path, char *property,
+void *load_device_tree(const char *filename_path, target_ulong load_addr);
+void dump_device_tree_to_file(void *fdt, const char *filename);
+void dt_cell(void *fdt, const char *node_path, const char *property,
uint32_t val);
-void dt_cell_multi(void *fdt, char *node_path, char *property,
+void dt_cell_multi(void *fdt, const char *node_path, const char *property,
uint32_t *val_array, int size);
-void dt_string(void *fdt, char *node_path, char *property,
+void dt_string(void *fdt, const char *node_path, const char *property,
char *string);
#endif