1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
3 * libfdt - Flat Device Tree manipulation
4 * Copyright (C) 2012 David Gibson, IBM Corporation.
6 #include "libfdt_env.h"
11 #include "libfdt_internal.h"
13 int fdt_create_empty_tree(void *buf
, int bufsize
)
17 err
= fdt_create(buf
, bufsize
);
21 err
= fdt_finish_reservemap(buf
);
25 err
= fdt_begin_node(buf
, "");
29 err
= fdt_end_node(buf
);
33 err
= fdt_finish(buf
);
37 return fdt_open_into(buf
, buf
, bufsize
);