mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Adjust util_is_printable_string() comment and fix test
This commit which changed the behaviour of this function broke one of the tests. Also the comment should be updated to reflect its new behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
1760e7ca03
commit
8055d77a5b
2 changed files with 7 additions and 4 deletions
|
@ -498,9 +498,10 @@ fdtget_tests () {
|
||||||
|
|
||||||
# run_fdtget_test <expected-result> [<flags>] <file> <node> <property>
|
# run_fdtget_test <expected-result> [<flags>] <file> <node> <property>
|
||||||
run_fdtget_test "MyBoardName" $dtb / model
|
run_fdtget_test "MyBoardName" $dtb / model
|
||||||
|
run_fdtget_test "MyBoardName MyBoardFamilyName" $dtb / compatible
|
||||||
run_fdtget_test "77 121 66 111 \
|
run_fdtget_test "77 121 66 111 \
|
||||||
97 114 100 78 97 109 101 0 77 121 66 111 97 114 100 70 97 109 105 \
|
97 114 100 78 97 109 101 0 77 121 66 111 97 114 100 70 97 109 105 \
|
||||||
108 121 78 97 109 101 0" $dtb / compatible
|
108 121 78 97 109 101 0" -t bu $dtb / compatible
|
||||||
run_fdtget_test "MyBoardName MyBoardFamilyName" -t s $dtb / compatible
|
run_fdtget_test "MyBoardName MyBoardFamilyName" -t s $dtb / compatible
|
||||||
run_fdtget_test 32768 $dtb /cpus/PowerPC,970@1 d-cache-size
|
run_fdtget_test 32768 $dtb /cpus/PowerPC,970@1 d-cache-size
|
||||||
run_fdtget_test 8000 -tx $dtb /cpus/PowerPC,970@1 d-cache-size
|
run_fdtget_test 8000 -tx $dtb /cpus/PowerPC,970@1 d-cache-size
|
||||||
|
|
8
util.h
8
util.h
|
@ -57,12 +57,14 @@ extern char *xstrdup(const char *s);
|
||||||
extern char *join_path(const char *path, const char *name);
|
extern char *join_path(const char *path, const char *name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check a string of a given length to see if it is all printable and
|
* Check a property of a given length to see if it is all printable and
|
||||||
* has a valid terminator.
|
* has a valid terminator. The property can contain either a single string,
|
||||||
|
* or multiple strings each of non-zero length.
|
||||||
*
|
*
|
||||||
* @param data The string to check
|
* @param data The string to check
|
||||||
* @param len The string length including terminator
|
* @param len The string length including terminator
|
||||||
* @return 1 if a valid printable string, 0 if not */
|
* @return 1 if a valid printable string, 0 if not
|
||||||
|
*/
|
||||||
int util_is_printable_string(const void *data, int len);
|
int util_is_printable_string(const void *data, int len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue