static void machine_set_loadparm(Object *obj, const char *val, Error **errp)

{

    S390CcwMachineState *ms = S390_CCW_MACHINE(obj);

    int i;



    for (i = 0; i < sizeof(ms->loadparm) && val[i]; i++) {

        uint8_t c = toupper(val[i]); /* mimic HMC */



        if (('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || (c == '.') ||

            (c == ' ')) {

            ms->loadparm[i] = c;

        } else {

            error_setg(errp, "LOADPARM: invalid character '%c' (ASCII 0x%02x)",

                       c, c);

            return;

        }

    }



    for (; i < sizeof(ms->loadparm); i++) {

        ms->loadparm[i] = ' '; /* pad right with spaces */

    }

}

static void machine_set_loadparm(Object *obj, const char *val, Error **errp)

{

    S390CcwMachineState *ms = S390_CCW_MACHINE(obj);

    int i;



    for (i = 0; i < sizeof(ms->loadparm) && val[i]; i++) {

        uint8_t c = toupper(val[i]); 



        if (('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || (c == '.') ||

            (c == ' ')) {

            ms->loadparm[i] = c;

        } else {

            error_setg(errp, "LOADPARM: invalid character '%c' (ASCII 0x%02x)",

                       c, c);

            return;

        }

    }



    for (; i < sizeof(ms->loadparm); i++) {

        ms->loadparm[i] = ' '; 

    }

}

static void FUNC_0(Object *VAR_0, const char *VAR_1, Error **VAR_2)

{

    S390CcwMachineState *ms = S390_CCW_MACHINE(VAR_0);

    int VAR_3;



    for (VAR_3 = 0; VAR_3 < sizeof(ms->loadparm) && VAR_1[VAR_3]; VAR_3++) {

        uint8_t c = toupper(VAR_1[VAR_3]); 



        if (('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || (c == '.') ||

            (c == ' ')) {

            ms->loadparm[VAR_3] = c;

        } else {

            error_setg(VAR_2, "LOADPARM: invalid character '%c' (ASCII 0x%02x)",

                       c, c);

            return;

        }

    }



    for (; VAR_3 < sizeof(ms->loadparm); VAR_3++) {

        ms->loadparm[VAR_3] = ' '; 

    }

}

static void FUNC_0(Object *VAR_0, const char *VAR_1, Error **VAR_2)
{ S390CcwMachineState *ms = S390_CCW_MACHINE(VAR_0); int VAR_3; for (VAR_3 = 0; VAR_3 < sizeof(ms->loadparm) && VAR_1[VAR_3]; VAR_3++) { uint8_t c = toupper(VAR_1[VAR_3]); if (('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || (c == '.') ||
(c == ' ')) { ms->loadparm[VAR_3] = c; } else { error_setg(VAR_2, "LOADPARM: invalid character '%c' (ASCII 0x%02x)",
c, c); return; } } for (; VAR_3 < sizeof(ms->loadparm); VAR_3++) { ms->loadparm[VAR_3] = ' '; } }