static int vhost_dev_set_features(struct vhost_dev *dev, bool enable_log)

{

    uint64_t features = dev->acked_features;

    int r;

    if (enable_log) {

        features |= 0x1ULL << VHOST_F_LOG_ALL;

    }

    r = dev->vhost_ops->vhost_set_features(dev, features);

    if (r < 0) {

        VHOST_OPS_DEBUG("vhost_set_features failed");

    }

    return r < 0 ? -errno : 0;

}

static int vhost_dev_set_features(struct vhost_dev *dev, bool enable_log)

{

    uint64_t features = dev->acked_features;

    int r;

    if (enable_log) {

        features |= 0x1ULL << VHOST_F_LOG_ALL;

    }

    r = dev->vhost_ops->vhost_set_features(dev, features);

    if (r < 0) {

        VHOST_OPS_DEBUG("vhost_set_features failed");

    }

    return r < 0 ? -errno : 0;

}

static int FUNC_0(struct vhost_dev *VAR_0, bool VAR_1)

{

    uint64_t features = VAR_0->acked_features;

    int VAR_2;

    if (VAR_1) {

        features |= 0x1ULL << VHOST_F_LOG_ALL;

    }

    VAR_2 = VAR_0->vhost_ops->vhost_set_features(VAR_0, features);

    if (VAR_2 < 0) {

        VHOST_OPS_DEBUG("vhost_set_features failed");

    }

    return VAR_2 < 0 ? -errno : 0;

}

static int FUNC_0(struct vhost_dev *VAR_0, bool VAR_1)
{ uint64_t features = VAR_0->acked_features; int VAR_2; if (VAR_1) { features |= 0x1ULL << VHOST_F_LOG_ALL; } VAR_2 = VAR_0->vhost_ops->vhost_set_features(VAR_0, features); if (VAR_2 < 0) { VHOST_OPS_DEBUG("vhost_set_features failed"); } return VAR_2 < 0 ? -errno : 0; }