c17a811c62ebdcb3ad6e7b5c9a0e0f64d5d64d8b |
|
04-Mar-2017 |
Nicolas Iooss <nicolas.iooss_linux@m4x.org> |
fdtput: Remove star from value_len documentation When clang checks the documentation tags (with -Wdocumentation flag), it reports the following warning: fdtput.c:70:11: error: parameter '*value_len' not found in the function declaration [-Werror,-Wdocumentation] * @param *value_len Returns length of value encoded ^~~~~~~~~~ fdtput.c:70:11: note: did you mean 'value_len'? * @param *value_len Returns length of value encoded ^~~~~~~~~~ value_len As this sounds reasonable, remove the star from the documentation tag. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
bad5b28049e5e0562a8ad91797fb77953a53fa20 |
|
05-Mar-2017 |
David Gibson <david@gibson.dropbear.id.au> |
Fix assorted sparse warnings This fixes a great many sparse warnings on the fdt and libfdt sources. These are mostly due to incorrect mixing of endian annotated and native integer types. This includes fixing a couple of quasi-bugs where we had endian conversions the wrong way around (this will have the right effect in practice, but is certainly conceptually incorrect). This doesn't make the whole tree sparse clean: there are many warnings in bison and lex generated code, and there are a handful of other remaining warnings that are (for now) more trouble than they're worth to fix (and are not genuine bugs). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
c539075ba8ba61fffbf7e005ce2e834868a9e0ab |
|
13-Jul-2016 |
Jean-Christophe Dubois <jcd@tribudubois.net> |
fdtput.c: Fix memory leak. CID 132821 (#1 of 1): Resource leak (RESOURCE_LEAK) 12. leaked_storage: Variable value going out of scope leaks the storage it points to. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
aa719618a8b7c748be659717a9fd003bfa186017 |
|
23-Jan-2015 |
Wang Long <long.wanglong@huawei.com> |
fdtput: add delete node and property function add the delete node and property function for fdtput. usage: 1) delete nodes fdtput -r <options> <dt file> [<node>...] 2) delete properties fdtput -d <options> <dt file> <node> [<property>...] Signed-off-by: Wang Long <long.wanglong@huawei.com>
/external/dtc/fdtput.c
|
8ce36476ae8d2541e9bf3a6c23c345ec03694ee3 |
|
02-Mar-2014 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
Consistently use xrealloc instead of realloc fdtput.c: Replace the remaining call to realloc by xrealloc. Some redundant lines in encode_value can be saved. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
/external/dtc/fdtput.c
|
d214655904b49938dafcb83797de3f6a0dc725c8 |
|
28-May-2013 |
Srinivas Kandagatla <srinivas.kandagatla@st.com> |
fdtput: expand fdt if value does not fit If you try to insert a new node or extend a property with large value, using fdtput you will notice that it always fails. example: fdtput -v -p -ts ./tst.dtb "/node-1" "property-1" "value-1 Error at 'node-1': FDT_ERR_NOSPACE or fdtput -v -c ./tst.dtb "/node-1" Error at 'node-1': FDT_ERR_NOSPACE or fdtput -v -ts ./tst.dtb "/node" "property" "very big value" Decoding value: string: 'very big value' Value size 15 Error at 'property': FDT_ERR_NOSPACE All these error are returned from libfdt, as the size of the fdt passed has no space to accomdate these new properties. This patch adds realloc functions in fdtput to allocate new space in fdt when it detects a shortage in space for new value or node. With this patch, fdtput can insert a new node or property or extend a property with new value greater than original size. Also it packs the final blob to clean up any extra padding. Without this patch fdtput tool complains with FDT_ERR_NOSPACE when we try to add a node/property or extend the value of a property. Testcases for the new behaviour added by David Gibson. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
b9e80656f2de441826ed2ff1cd9c5d43b3ae43d3 |
|
24-May-2013 |
Mike Frysinger <vapier@gentoo.org> |
util: drop "long" from usage helpers Now that all utils have converted to the new usage framework, we can rename to just plain "usage()" and avoid naming conflicts. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
03449b84c8f9aee2bf2f438bec2c2ec4606bea48 |
|
24-May-2013 |
Mike Frysinger <vapier@gentoo.org> |
dtc/fdt{get, put}/convert-dtsv0-lexer: convert to new usage helpers This helps standardize the flag processing and the usage screens. Only lightly tested; would be great if someone who uses these utils could double check. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
5543b88d5e3047b781552eb431bc2e3bdd9ade06 |
|
22-Apr-2013 |
Jon Loeliger <jdl@jdl.com> |
Revert "utilfdt_read: pass back up the length of data read" This reverts commit cc2c178727cdeca4eb9756637c2e09e50e0856e7. It was the wrong version of the patch.
/external/dtc/fdtput.c
|
cc2c178727cdeca4eb9756637c2e09e50e0856e7 |
|
10-Apr-2013 |
Mike Frysinger <vapier@gentoo.org> |
utilfdt_read: pass back up the length of data read For a follow up commit, we want to be able to scan the buffer that was returned to us. In order to do that safely, we need to know how big the buffer actually is, so pass that back if requested. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/dtc/fdtput.c
|
f807af192828222dee7a5c9f94d999673bb4d8a1 |
|
12-Jul-2012 |
Simon Glass <sjg@chromium.org> |
fdtput: Add -p option to create subnodes along entire path This option mimics mkdir's -p option. It automatically creates nodes as needed along the path provided. If the node already exists, no error is given. Signed-off-by: Simon Glass <sjg@chromium.org>
/external/dtc/fdtput.c
|
3553dfac224435233f2c0d33169194098e979c88 |
|
10-Jul-2012 |
Simon Glass <sjg@chromium.org> |
fdtput: Adjust report_error() to use name, namelen params As with many fdt functions, report_error() should permit a namelen to be specified, thus obviating the need for nul termination in strings passed to it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
d46c2de5700fd8d43de67ca3709c276beba39b39 |
|
12-Jul-2012 |
Simon Glass <sjg@chromium.org> |
fdtput: Add -c option to create nodes This option allows the creation of new nodes in a dtb file. The syntax is: fdtput -c <dtb_file> <node_path> The node_path contains the path of the node to be created. All path components up to the final one must exist already. The final one must not exist already. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
f58dff50407c0ee56b372ab201469c18dc042f56 |
|
12-Jul-2012 |
Simon Glass <sjg@chromium.org> |
fdtput: Prepare to support multiple operations We want to add new options to this tool. In preparation for this, add the concept of a current operation. Signed-off-by: Simon Glass <sjg@chromium.org>
/external/dtc/fdtput.c
|
bb21f0a766056114e4d9336324b4c294f640d9d1 |
|
10-Jul-2012 |
Simon Glass <sjg@chromium.org> |
fdtput: Fix nit in help message There was an extra < in the help message, so fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/fdtput.c
|
1ede50c3559bbfca79fadcbfd8acb9388f4aac87 |
|
21-Jan-2012 |
Simon Glass <sjg@chromium.org> |
Add fdtput utility to write property values to a device tree This simple utility allows writing of values into a device tree from the command line. It aimes to be the opposite of fdtget. What is it for: - Updating fdt values when a binary blob already exists (even though source may be available it might be easier to use this utility rather than sed, etc.) - Writing machine-specific fdt values within a build system To use it, specify the fdt binary file on command line followed by the node and property to set. Then, provide a list of values to put into that property. Often there will be just one, but fdtput also supports arrays and string lists. fdtput does not try to guess the type of the property based on looking at the arguments. Instead it always assumes that an integer is provided. To indicate that you want to write a string, use -ts. You can also provide hex values with -tx. The command line arguments are joined together into a single value. For strings, a nul terminator is placed between each string when it is packed into the property. To avoid this, pass the string as a single argument. Usage: fdtput <options> <dt file> <<node> <property> [<value>...] Options: -t <type> Type of data -v Verbose: display each value decoded from command line -h Print this help <type> s=string, i=int, u=unsigned, x=hex Optional modifier prefix: hh or b=byte, h=2 byte, l=4 byte (default) To read from stdin and write to stdout, use - as the file. So you can do: cat somefile.dtb | fdtput -ts - /node prop "My string value" > newfile.dtb This commit also adds basic tests to verify the major features. Signed-off-by: Simon Glass <sjg@chromium.org>
/external/dtc/fdtput.c
|