diff options
author | Simon Glass | 2016-07-25 18:59:14 -0600 |
---|---|---|
committer | Simon Glass | 2016-09-18 21:04:39 -0600 |
commit | 2a70d897ed68fd521411a10831ac05e1ffdd3d41 (patch) | |
tree | e3923ef5b91172f52da3627b6370e9fbee6b5bc2 /lib/libfdt | |
parent | 0170804f60b19a2033ac39964fcd192a0c7eda42 (diff) |
dtoc: Support deleting device tree properties
Add support for deleting a device tree property. With the fallback
implementation this uses fdtput. With libfdt it uses the API call and
updates the offsets afterwards.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/libfdt')
-rw-r--r-- | lib/libfdt/libfdt.swig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libfdt/libfdt.swig b/lib/libfdt/libfdt.swig index 26d42fc5d69..ce516fddf22 100644 --- a/lib/libfdt/libfdt.swig +++ b/lib/libfdt/libfdt.swig @@ -95,3 +95,15 @@ const char *fdt_get_name(const void *fdt, int nodeoffset, int *OUTPUT); const char *fdt_string(const void *fdt, int stroffset); int fdt_first_subnode(const void *fdt, int offset); int fdt_next_subnode(const void *fdt, int offset); + +%typemap(in) (void *) { + if (!PyByteArray_Check($input)) { + SWIG_exception_fail(SWIG_TypeError, "in method '" "$symname" "', argument " + "$argnum"" of type '" "$type""'"); + } + $1 = PyByteArray_AsString($input); +} + +int fdt_delprop(void *fdt, int nodeoffset, const char *name); + +const char *fdt_strerror(int errval); |