static int parse_chr(DeviceState *dev, Property *prop, const char *str)

{

    CharDriverState **ptr = qdev_get_prop_ptr(dev, prop);



    *ptr = qemu_chr_find(str);

    if (*ptr == NULL) {

        return -ENOENT;

    }

    if ((*ptr)->assigned) {

        return -EEXIST;

    }

    (*ptr)->assigned = 1;

    return 0;

}

static int parse_chr(DeviceState *dev, Property *prop, const char *str)

{

    CharDriverState **ptr = qdev_get_prop_ptr(dev, prop);



    *ptr = qemu_chr_find(str);

    if (*ptr == NULL) {

        return -ENOENT;

    }

    if ((*ptr)->assigned) {

        return -EEXIST;

    }

    (*ptr)->assigned = 1;

    return 0;

}

    if ((*ptr)->assigned) {     (*ptr)->assigned = 1;
static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)

{

    CharDriverState **ptr = qdev_get_prop_ptr(VAR_0, VAR_1);



    *ptr = qemu_chr_find(VAR_2);

    if (*ptr == NULL) {

        return -ENOENT;

    }

    if ((*ptr)->assigned) {

        return -EEXIST;

    }

    (*ptr)->assigned = 1;

    return 0;

}

static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)
{ CharDriverState **ptr = qdev_get_prop_ptr(VAR_0, VAR_1); *ptr = qemu_chr_find(VAR_2); if (*ptr == NULL) { return -ENOENT; } if ((*ptr)->assigned) { return -EEXIST; } (*ptr)->assigned = 1; return 0; }