virDomainDeviceInfoCheckBootIndex(virDomainDefPtr def G_GNUC_UNUSED,
                                  virDomainDeviceDefPtr device G_GNUC_UNUSED,
                                  virDomainDeviceInfoPtr info,
                                  void *opaque)
{
    virDomainCompatibleDeviceDataPtr data = opaque;

    /* Ignore the device we're about to update */
    if (data->oldInfo == info)
        return 0;

    if (info->bootIndex == data->newInfo->bootIndex) {
        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                       _("boot order %u is already used by another device"),
                       data->newInfo->bootIndex);
        return -1;
    }
    return 0;
}
virDomainDeviceInfoCheckBootIndex(virDomainDefPtr def G_GNUC_UNUSED,
                                  virDomainDeviceDefPtr device G_GNUC_UNUSED,
                                  virDomainDeviceInfoPtr info,
                                  void *opaque)
{
    virDomainCompatibleDeviceDataPtr data = opaque;

     
    if (data->oldInfo == info)
        return 0;

    if (info->bootIndex == data->newInfo->bootIndex) {
        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                       _("boot order %u is already used by another device"),
                       data->newInfo->bootIndex);
        return -1;
    }
    return 0;
}