static int spapr_check_htab_fd(sPAPRMachineState *spapr)

{

    int rc = 0;



    if (spapr->htab_fd_stale) {

        close(spapr->htab_fd);

        spapr->htab_fd = kvmppc_get_htab_fd(false);

        if (spapr->htab_fd < 0) {

            error_report("Unable to open fd for reading hash table from KVM: "

                         "%s", strerror(errno));

            rc = -1;

        }

        spapr->htab_fd_stale = false;

    }



    return rc;

}

static int spapr_check_htab_fd(sPAPRMachineState *spapr)

{

    int rc = 0;



    if (spapr->htab_fd_stale) {

        close(spapr->htab_fd);

        spapr->htab_fd = kvmppc_get_htab_fd(false);

        if (spapr->htab_fd < 0) {

            error_report("Unable to open fd for reading hash table from KVM: "

                         "%s", strerror(errno));

            rc = -1;

        }

        spapr->htab_fd_stale = false;

    }



    return rc;

}

static int FUNC_0(sPAPRMachineState *VAR_0)

{

    int VAR_1 = 0;



    if (VAR_0->htab_fd_stale) {

        close(VAR_0->htab_fd);

        VAR_0->htab_fd = kvmppc_get_htab_fd(false);

        if (VAR_0->htab_fd < 0) {

            error_report("Unable to open fd for reading hash table from KVM: "

                         "%s", strerror(errno));

            VAR_1 = -1;

        }

        VAR_0->htab_fd_stale = false;

    }



    return VAR_1;

}

static int FUNC_0(sPAPRMachineState *VAR_0)
{ int VAR_1 = 0; if (VAR_0->htab_fd_stale) { close(VAR_0->htab_fd); VAR_0->htab_fd = kvmppc_get_htab_fd(false); if (VAR_0->htab_fd < 0) { error_report("Unable to open fd for reading hash table from KVM: "
"%s", strerror(errno)); VAR_1 = -1; } VAR_0->htab_fd_stale = false; } return VAR_1; }