Skip to content

Commit

Permalink
Allow qemu_devtree_setprop() to take arbitrary values
Browse files Browse the repository at this point in the history
Currently qemu_devtree_setprop() expects the new property value to be
given as a uint32_t *.  While property values consisting of u32s are
common, in general they can have any bytestring value.

Therefore, this patch alters the function to take a void * instead,
allowing callers to easily give anything as the property value.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
David Gibson authored and agraf committed Apr 1, 2011
1 parent 81762d6 commit c489749
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion device_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
}

int qemu_devtree_setprop(void *fdt, const char *node_path,
const char *property, uint32_t *val_array, int size)
const char *property, void *val_array, int size)
{
int offset;

Expand Down
2 changes: 1 addition & 1 deletion device_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
void *load_device_tree(const char *filename_path, int *sizep);

int qemu_devtree_setprop(void *fdt, const char *node_path,
const char *property, uint32_t *val_array, int size);
const char *property, void *val_array, int size);
int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
const char *property, uint32_t val);
int qemu_devtree_setprop_string(void *fdt, const char *node_path,
Expand Down

0 comments on commit c489749

Please sign in to comment.