static int read_cpuinfo(const char *field, char *value, int len)

{

    FILE *f;

    int ret = -1;

    int field_len = strlen(field);

    char line[512];



    f = fopen("/proc/cpuinfo", "r");

    if (!f) {

        return -1;

    }



    do {

        if(!fgets(line, sizeof(line), f)) {

            break;

        }

        if (!strncmp(line, field, field_len)) {

            strncpy(value, line, len);

            ret = 0;

            break;

        }

    } while(*line);



    fclose(f);



    return ret;

}

static int read_cpuinfo(const char *field, char *value, int len)

{

    FILE *f;

    int ret = -1;

    int field_len = strlen(field);

    char line[512];



    f = fopen("/proc/cpuinfo", "r");

    if (!f) {

        return -1;

    }



    do {

        if(!fgets(line, sizeof(line), f)) {

            break;

        }

        if (!strncmp(line, field, field_len)) {

            strncpy(value, line, len);

            ret = 0;

            break;

        }

    } while(*line);



    fclose(f);



    return ret;

}

            strncpy(value, line, len);
static int FUNC_0(const char *VAR_0, char *VAR_1, int VAR_2)

{

    FILE *f;

    int VAR_3 = -1;

    int VAR_4 = strlen(VAR_0);

    char VAR_5[512];



    f = fopen("/proc/cpuinfo", "r");

    if (!f) {

        return -1;

    }



    do {

        if(!fgets(VAR_5, sizeof(VAR_5), f)) {

            break;

        }

        if (!strncmp(VAR_5, VAR_0, VAR_4)) {

            strncpy(VAR_1, VAR_5, VAR_2);

            VAR_3 = 0;

            break;

        }

    } while(*VAR_5);



    fclose(f);



    return VAR_3;

}

static int FUNC_0(const char *VAR_0, char *VAR_1, int VAR_2)
{ FILE *f; int VAR_3 = -1; int VAR_4 = strlen(VAR_0); char VAR_5[512]; f = fopen("/proc/cpuinfo", "r"); if (!f) { return -1; } do { if(!fgets(VAR_5, sizeof(VAR_5), f)) { break; } if (!strncmp(VAR_5, VAR_0, VAR_4)) { strncpy(VAR_1, VAR_5, VAR_2); VAR_3 = 0; break; } } while(*VAR_5); fclose(f); return VAR_3; }