From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42145 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoGs4-0008UZ-IR for qemu-devel@nongnu.org; Sat, 12 Feb 2011 09:54:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PoGs2-0006sZ-8r for qemu-devel@nongnu.org; Sat, 12 Feb 2011 09:54:48 -0500 Received: from ozlabs.org ([203.10.76.45]:59884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PoGs1-0006sF-Sp for qemu-devel@nongnu.org; Sat, 12 Feb 2011 09:54:46 -0500 From: David Gibson Date: Sun, 13 Feb 2011 01:54:15 +1100 Message-Id: <1297522467-5975-4-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1297522467-5975-1-git-send-email-david@gibson.dropbear.id.au> References: <1297522467-5975-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PATCH 03/15] Allow qemu_devtree_setprop() to take arbitrary values List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: paulus@samba.org, agraf@suse.de, anton@samba.org From: David Gibson 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 --- device_tree.c | 2 +- device_tree.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device_tree.c b/device_tree.c index 426a631..21be070 100644 --- a/device_tree.c +++ b/device_tree.c @@ -74,7 +74,7 @@ fail: } 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; diff --git a/device_tree.h b/device_tree.h index f05c4e7..cecd98f 100644 --- a/device_tree.h +++ b/device_tree.h @@ -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, -- 1.7.1