summaryrefslogblamecommitdiffstats
path: root/include/hw/ppc/fdt.h
blob: fff3e1b57763a783493d1abc39846aefdfbf7396 (plain) (tree)






















                                                                           
/*
 * QEMU PowerPC helper routines for the device tree.
 *
 * Copyright (C) 2016 IBM Corp.
 *
 * This code is licensed under the GPL version 2 or later. See the
 * COPYING file in the top-level directory.
 */

#ifndef PPC_FDT_H
#define PPC_FDT_H

#define _FDT(exp)                               \
    do { \
        int ret = (exp);                                           \
        if (ret < 0) {                                             \
            fprintf(stderr, "qemu: error creating device tree: %s: %s\n", \
                    #exp, fdt_strerror(ret));                      \
            exit(1);                                               \
        }                                                          \
    } while (0)

#endif /* PPC_FDT_H */