static char *scsibus_get_dev_path(DeviceState *dev)

{

    SCSIDevice *d = DO_UPCAST(SCSIDevice, qdev, dev);

    DeviceState *hba = dev->parent_bus->parent;

    char *id = NULL;



    if (hba && hba->parent_bus && hba->parent_bus->info->get_dev_path) {

        id = hba->parent_bus->info->get_dev_path(hba);

    }

    if (id) {

        return g_strdup_printf("%s/%d:%d:%d", id, d->channel, d->id, d->lun);

    } else {

        return g_strdup_printf("%d:%d:%d", d->channel, d->id, d->lun);

    }

}

static char *scsibus_get_dev_path(DeviceState *dev)

{

    SCSIDevice *d = DO_UPCAST(SCSIDevice, qdev, dev);

    DeviceState *hba = dev->parent_bus->parent;

    char *id = NULL;



    if (hba && hba->parent_bus && hba->parent_bus->info->get_dev_path) {

        id = hba->parent_bus->info->get_dev_path(hba);

    }

    if (id) {

        return g_strdup_printf("%s/%d:%d:%d", id, d->channel, d->id, d->lun);

    } else {

        return g_strdup_printf("%d:%d:%d", d->channel, d->id, d->lun);

    }

}

        return g_strdup_printf("%s/%d:%d:%d", id, d->channel, d->id, d->lun);         return g_strdup_printf("%d:%d:%d", d->channel, d->id, d->lun);
static char *FUNC_0(DeviceState *VAR_0)

{

    SCSIDevice *d = DO_UPCAST(SCSIDevice, qdev, VAR_0);

    DeviceState *hba = VAR_0->parent_bus->parent;

    char *VAR_1 = NULL;



    if (hba && hba->parent_bus && hba->parent_bus->info->get_dev_path) {

        VAR_1 = hba->parent_bus->info->get_dev_path(hba);

    }

    if (VAR_1) {

        return g_strdup_printf("%s/%d:%d:%d", VAR_1, d->channel, d->VAR_1, d->lun);

    } else {

        return g_strdup_printf("%d:%d:%d", d->channel, d->VAR_1, d->lun);

    }

}

static char *FUNC_0(DeviceState *VAR_0)
{ SCSIDevice *d = DO_UPCAST(SCSIDevice, qdev, VAR_0); DeviceState *hba = VAR_0->parent_bus->parent; char *VAR_1 = NULL; if (hba && hba->parent_bus && hba->parent_bus->info->get_dev_path) { VAR_1 = hba->parent_bus->info->get_dev_path(hba); } if (VAR_1) { return g_strdup_printf("%s/%d:%d:%d", VAR_1, d->channel, d->VAR_1, d->lun); } else { return g_strdup_printf("%d:%d:%d", d->channel, d->VAR_1, d->lun); } }