1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Added build-date field in serialized data

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@35 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
Veselin Georgiev 2008-12-04 10:27:23 +00:00
parent da2eb29639
commit 1070fc3f25

View file

@ -303,6 +303,7 @@ int cpuid_serialize_raw_data(struct cpu_raw_data_t* data, const char* filename)
if (!f) return set_error(ERR_OPEN);
fprintf(f, "version=%s\n", VERSION);
fprintf(f, "build_date=%s\n", __DATE__);
for (i = 0; i < MAX_CPUID_LEVEL; i++)
fprintf(f, "basic_cpuid[%d]=%08x %08x %08x %08x\n", i,
data->basic_cpuid[i][0], data->basic_cpuid[i][1],
@ -355,7 +356,7 @@ int cpuid_deserialize_raw_data(struct cpu_raw_data_t* data, const char* filename
value = &line[i + 1];
/* try to recognize the line */
recognized = 0;
if (!strcmp(token, "version")) {
if (!strcmp(token, "version") || !strcmp(token, "build_date")) {
recognized = 1;
}
syntax = 1;