static int xen_host_pci_config_open(XenHostPCIDevice *d)

{

    char path[PATH_MAX];

    int rc;



    rc = xen_host_pci_sysfs_path(d, "config", path, sizeof (path));

    if (rc) {

        return rc;

    }

    d->config_fd = open(path, O_RDWR);

    if (d->config_fd < 0) {

        return -errno;

    }

    return 0;

}

static int xen_host_pci_config_open(XenHostPCIDevice *d)

{

    char path[PATH_MAX];

    int rc;



    rc = xen_host_pci_sysfs_path(d, "config", path, sizeof (path));

    if (rc) {

        return rc;

    }

    d->config_fd = open(path, O_RDWR);

    if (d->config_fd < 0) {

        return -errno;

    }

    return 0;

}

    return 0;     if (rc) {         return rc;     if (rc) {         return rc;     int rc;     rc = xen_host_pci_sysfs_path(d, "config", path, sizeof (path));     if (rc) {         return rc;
static int FUNC_0(XenHostPCIDevice *VAR_0)

{

    char VAR_1[PATH_MAX];

    int VAR_2;



    VAR_2 = xen_host_pci_sysfs_path(VAR_0, "config", VAR_1, sizeof (VAR_1));

    if (VAR_2) {

        return VAR_2;

    }

    VAR_0->config_fd = open(VAR_1, O_RDWR);

    if (VAR_0->config_fd < 0) {

        return -errno;

    }

    return 0;

}

static int FUNC_0(XenHostPCIDevice *VAR_0)
{ char VAR_1[PATH_MAX]; int VAR_2; VAR_2 = xen_host_pci_sysfs_path(VAR_0, "config", VAR_1, sizeof (VAR_1)); if (VAR_2) { return VAR_2; } VAR_0->config_fd = open(VAR_1, O_RDWR); if (VAR_0->config_fd < 0) { return -errno; } return 0; }