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

{

    uint8_t *ptr = qdev_get_prop_ptr(dev, prop);

    const char *fmt;



    /* accept both hex and decimal */

    fmt = strncasecmp(str, "0x",2) == 0 ? "%" PRIx8 : "%" PRIu8;

    if (sscanf(str, fmt, ptr) != 1)

        return -EINVAL;

    return 0;

}

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

{

    uint8_t *ptr = qdev_get_prop_ptr(dev, prop);

    const char *fmt;



    

    fmt = strncasecmp(str, "0x",2) == 0 ? "%" PRIx8 : "%" PRIu8;

    if (sscanf(str, fmt, ptr) != 1)

        return -EINVAL;

    return 0;

}

    const char *fmt;     fmt = strncasecmp(str, "0x",2) == 0 ? "%" PRIx8 : "%" PRIu8;     if (sscanf(str, fmt, ptr) != 1)     const char *fmt;     if (sscanf(str, fmt, ptr) != 1)     const char *fmt;     if (sscanf(str, fmt, ptr) != 1)     const char *fmt;     if (sscanf(str, fmt, ptr) != 1)
static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)

{

    uint8_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);

    const char *VAR_3;



    

    VAR_3 = strncasecmp(VAR_2, "0x",2) == 0 ? "%" PRIx8 : "%" PRIu8;

    if (sscanf(VAR_2, VAR_3, ptr) != 1)

        return -EINVAL;

    return 0;

}

static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)
{ uint8_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1); const char *VAR_3; VAR_3 = strncasecmp(VAR_2, "0x",2) == 0 ? "%" PRIx8 : "%" PRIu8; if (sscanf(VAR_2, VAR_3, ptr) != 1)
return -EINVAL; return 0; }