38ad79d33946590c862567c7cbdf25b5a46d8149 |
|
14-Nov-2012 |
Kim Phillips <kim.phillips@freescale.com> |
dtc/tests: don't include fdt.h prior to libfdt.h tests will need fdt type definitions provided in a subsequent patch to libfdt_env.h. Since libfdt.h includes libfdt_env.h in the right order anyway, just remove the fdt.h include. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/get_path.c
|
8daae14b742a48078c77fca3ccb24cd376232bc1 |
|
29-Aug-2008 |
David Gibson <david@gibson.dropbear.id.au> |
libfdt: Fix bugs in fdt_get_path() The current implementation of fdt_get_path() has a couple of bugs, fixed by this patch. First, contrary to its documentation, on success it returns the length of the node's path, rather than 0. The testcase is correspondingly wrong, and the patch fixes this as well. Second, in some circumstances, it will return -FDT_ERR_BADOFFSET instead of -FDT_ERR_NOSPACE when given insufficient buffer space. Specifically this happens when there is insufficient space even to hold the path's second last component. This behaviour is corrected, and the testcase updated to check it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/get_path.c
|
01a2d8a3e9f19cb1f5ee923af23682fad783a799 |
|
04-Aug-2008 |
David Gibson <david@gibson.dropbear.id.au> |
dtc: Make many functions 'static' This patch marks various functions not shared between c files 'static', as they should be. There are a couple of functions in dtc, and many in the testsuite. This is *almost* enough to enable the -Wmissing-prototypes warning. It's not quite enough, because there's a mess of junk in the flex generated code which triggers that warning which I'm not yet sure how to deal with. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/get_path.c
|
cdcb415851dc6c3e9550f27139c933fcaeb2d6a7 |
|
26-Jun-2008 |
David Gibson <david@gibson.dropbear.id.au> |
dtc: Address an assortment of portability problems I've recently worked with a FreeBSD developer, getting dtc and libfdt working on FreeBSD. This showed up a number of portability problems in the dtc package which this patch addresses. Changes are as follows: - the parent_offset and supernode_atdepth_offset testcases used the glibc extension functions strchrnul() and strndupa(). Those are removed, using slightly longer coding with standard C functions instead. - some other testcases had a #define _GNU_SOURCE for no particular reason. This is removed. - run_tests.sh has bash specific constructs removed, and the interpreter changed to /bin/sh. This apparently now runs fine on FreeBSD's /bin/sh, and I've also tested it with both ash and dash. - convert-dtsv0-lexer.l has some extra #includes added. These must have been included indirectly with Linux and glibc, but aren't on FreeBSD. - the endian handling functions in libfdt_env.h, based on endian.h and byteswap.h are replaced with some portable open-coded versions. Unfortunately, these result in fairly crappy code when compiled, but as far as I can determine there doesn't seem to be any POSIX, SUS or de facto standard way of determining endianness at compile time, nor standard names for byteswapping functions. - some more endian handling, from testdata.h using the problematic endian.h is simply removed, since it wasn't actually being used anyway. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/get_path.c
|
d2a9da045897c37071597d9aa473964717b14735 |
|
28-Sep-2007 |
David Gibson <david@gibson.dropbear.id.au> |
libfdt: Make unit address optional for finding nodes At present, the fdt_subnode_offset() and fdt_path_offset() functions in libfdt require the exact name of the nodes in question be passed, including unit address. This is contrary to traditional OF-like finddevice() behaviour, which allows the unit address to be omitted (which is useful when the device name is unambiguous without the address). This patch introduces similar behaviour to fdt_subnode_offset_namelen(), and hence to fdt_subnode_offset() and fdt_path_offset() which are implemented in terms of the former. The unit address can be omitted from the given node name. If this is ambiguous, the first such node in the flattened tree will be selected (this behaviour is consistent with IEEE1275 which specifies only that an arbitrary node matching the given information be selected). This very small change is then followed by many more diffs which change the test examples and testcases to exercise this behaviour. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/get_path.c
|
037db263e04f43cb113064fa24e1b441ff761528 |
|
30-Aug-2007 |
David Gibson <david@gibson.dropbear.id.au> |
libfdt: Add fdt_get_path() function This patch adds an fdt_get_path() function to libfdt, which returns the full path of a given node in a caller supplied buffer. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/get_path.c
|