static int xen_host_pci_sysfs_path(const XenHostPCIDevice *d,

                                   const char *name, char *buf, ssize_t size)

{

    int rc;



    rc = snprintf(buf, size, "/sys/bus/pci/devices/%04x:%02x:%02x.%d/%s",

                  d->domain, d->bus, d->dev, d->func, name);



    if (rc >= size || rc < 0) {

        /* The output is truncated, or some other error was encountered */

        return -ENODEV;

    }

    return 0;

}

static int xen_host_pci_sysfs_path(const XenHostPCIDevice *d,

                                   const char *name, char *buf, ssize_t size)

{

    int rc;



    rc = snprintf(buf, size, "/sys/bus/pci/devices/%04x:%02x:%02x.%d/%s",

                  d->domain, d->bus, d->dev, d->func, name);



    if (rc >= size || rc < 0) {

        

        return -ENODEV;

    }

    return 0;

}

static int xen_host_pci_sysfs_path(const XenHostPCIDevice *d,                                    const char *name, char *buf, ssize_t size)     if (rc >= size || rc < 0) {         return -ENODEV;     return 0;     int rc;
static int FUNC_0(const XenHostPCIDevice *VAR_0,

                                   const char *VAR_1, char *VAR_2, ssize_t VAR_3)

{

    int VAR_4;



    VAR_4 = snprintf(VAR_2, VAR_3, "/sys/bus/pci/devices/%04x:%02x:%02x.%VAR_0/%s",

                  VAR_0->domain, VAR_0->bus, VAR_0->dev, VAR_0->func, VAR_1);



    if (VAR_4 >= VAR_3 || VAR_4 < 0) {

        

        return -ENODEV;

    }

    return 0;

}

static int FUNC_0(const XenHostPCIDevice *VAR_0,
const char *VAR_1, char *VAR_2, ssize_t VAR_3)
{ int VAR_4; VAR_4 = snprintf(VAR_2, VAR_3, "/sys/bus/pci/devices/%04x:%02x:%02x.%VAR_0/%s",
VAR_0->domain, VAR_0->bus, VAR_0->dev, VAR_0->func, VAR_1); if (VAR_4 >= VAR_3 || VAR_4 < 0) { return -ENODEV; } return 0; }