mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Move property-printing into util
The function that prints a property can be useful to other programs, so move it into util. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
8055d77a5b
commit
d20391d6ff
3 changed files with 52 additions and 36 deletions
14
util.h
14
util.h
|
@ -152,4 +152,18 @@ int utilfdt_decode_type(const char *fmt, int *type, int *size);
|
|||
"\tOptional modifier prefix:\n" \
|
||||
"\t\thh or b=byte, h=2 byte, l=4 byte (default)\n";
|
||||
|
||||
/**
|
||||
* Print property data in a readable format to stdout
|
||||
*
|
||||
* Properties that look like strings will be printed as strings. Otherwise
|
||||
* the data will be displayed either as cells (if len is a multiple of 4
|
||||
* bytes) or bytes.
|
||||
*
|
||||
* If len is 0 then this function does nothing.
|
||||
*
|
||||
* @param data Pointers to property data
|
||||
* @param len Length of property data
|
||||
*/
|
||||
void utilfdt_print_data(const char *data, int len);
|
||||
|
||||
#endif /* _UTIL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue