dtc/tests
David Gibson 9a9fdf5991 libfdt: More consistent handling of returned error codes.
At present, libfdt functions returning a structure offset return a
zero-or-positive offset on success, and return a negative error code
on failure.  Functions which only return an error code return a
positive version of the error code, or 0 on success.

This patch improves consistency by always returning negative error
codes on failure, for both types of function.  With this change, we do
away with the special fdt_offset_error() macro for checking whether a
returned offset value is an error and extracting the encoded error
value within.  Instead an explicit (ret_value < 0) is now the
preferred way of checking return values for both offset-returning and
error-code-returning functions.

The fdt_strerror() function in the test code is updated
correspondingly to make more sense with the new conventions.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2006-12-15 15:12:51 +11:00
..
.gitignore libfdt: Add dtb files to .gitignore 2006-12-04 11:17:32 +11:00
Makefile libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
del_node.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
del_property.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
dumptrees.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
find_property.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
getprop.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
move_and_save.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
nop_node.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
nop_property.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
notfound.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
open_pack.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
path_offset.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
root_node.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
run_tests.sh libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
rw_tree1.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
setprop.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
setprop_inplace.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
subnode_offset.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
sw_tree1.c libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
testdata.h libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
tests.h libfdt: Use void * to refer to device tree blobs 2006-12-15 15:12:47 +11:00
testutils.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00
trees.S libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
truncated_property.c libfdt: More consistent handling of returned error codes. 2006-12-15 15:12:51 +11:00