1 /* 2 * QEMU PowerPC helper routines for the device tree. 3 * 4 * Copyright (C) 2016 IBM Corp. 5 * 6 * This code is licensed under the GPL version 2 or later. See the 7 * COPYING file in the top-level directory. 8 */ 9 10 #ifndef PPC_FDT_H 11 #define PPC_FDT_H 12 13 #include "qemu/error-report.h" 14 15 #define _FDT(exp) \ 16 do { \ 17 int ret = (exp); \ 18 if (ret < 0) { \ 19 error_report("error creating device tree: %s: %s", \ 20 #exp, fdt_strerror(ret)); \ 21 exit(1); \ 22 } \ 23 } while (0) 24 25 #endif /* PPC_FDT_H */ 26