| 325 | } |
| 326 | |
| 327 | int fdt_move(const void *fdt, void *buf, int bufsize) |
| 328 | { |
| 329 | if (!can_assume(VALID_INPUT) && bufsize < 0) |
| 330 | return -FDT_ERR_NOSPACE; |
| 331 | |
| 332 | FDT_RO_PROBE(fdt); |
| 333 | |
| 334 | if (fdt_totalsize(fdt) > (unsigned int)bufsize) |
| 335 | return -FDT_ERR_NOSPACE; |
| 336 | |
| 337 | memmove(buf, fdt, fdt_totalsize(fdt)); |
| 338 | return 0; |
| 339 | } |