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 #define _FDT(exp) \ 14 do { \ 15 int ret = (exp); \ 16 if (ret < 0) { \ 17 fprintf(stderr, "qemu: error creating device tree: %s: %s\n", \ 18 #exp, fdt_strerror(ret)); \ 19 exit(1); \ 20 } \ 21 } while (0) 22 23 #endif /* PPC_FDT_H */ 24