int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size)

{

    long len;



    if (fd < 0) {

        return -1;

    }



    len = (window_size / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE);

    if ((munmap(table, len) < 0) ||

        (close(fd) < 0)) {

        fprintf(stderr, "KVM: Unexpected error removing TCE table: %s",

                strerror(errno));

        /* Leak the table */

    }



    return 0;

}

int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size)

{

    long len;



    if (fd < 0) {

        return -1;

    }



    len = (window_size / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE);

    if ((munmap(table, len) < 0) ||

        (close(fd) < 0)) {

        fprintf(stderr, "KVM: Unexpected error removing TCE table: %s",

                strerror(errno));

        

    }



    return 0;

}

int FUNC_0(void *VAR_0, int VAR_1, uint32_t VAR_2)

{

    long VAR_3;



    if (VAR_1 < 0) {

        return -1;

    }



    VAR_3 = (VAR_2 / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE);

    if ((munmap(VAR_0, VAR_3) < 0) ||

        (close(VAR_1) < 0)) {

        fprintf(stderr, "KVM: Unexpected error removing TCE VAR_0: %s",

                strerror(errno));

        

    }



    return 0;

}

int FUNC_0(void *VAR_0, int VAR_1, uint32_t VAR_2)
{ long VAR_3; if (VAR_1 < 0) { return -1; } VAR_3 = (VAR_2 / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE); if ((munmap(VAR_0, VAR_3) < 0) ||
(close(VAR_1) < 0)) { fprintf(stderr, "KVM: Unexpected error removing TCE VAR_0: %s",
strerror(errno)); } return 0; }