"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libsysinfo-0.2.2/Linux/cpuinfo_ia64.c" between
linux_logo-5.11.tar.gz and linux_logo-6.0.tar.gz

About: Linux_Logo - an ANSI Color Penguin Logo that can be run at bootup. Also shows some system info.

cpuinfo_ia64.c  (linux_logo-5.11):cpuinfo_ia64.c  (linux_logo-6.0)
skipping to change at line 31 skipping to change at line 31
int rev_int = 0; int rev_int = 0;
int cpu_count = 0; int cpu_count = 0;
float megahertz = 0.0, bogomips = 0.0; float megahertz = 0.0, bogomips = 0.0;
vendor_string[0] = model_string[0] = plain_model[0] = family_string[0] = 0; vendor_string[0] = model_string[0] = plain_model[0] = family_string[0] = 0;
/* We get all of our info here from /proc/cpuinfo */ /* We get all of our info here from /proc/cpuinfo */
if ((fff = fopen(get_cpuinfo_file(), "r")) != NULL) { if ((fff = fopen(get_cpuinfo_file(), "r")) != NULL) {
while ((fgets(temp_string, BUFSIZ, fff) != NULL)) { while ((fgets(temp_string, BUFSIZ, fff) != NULL)) {
/* Assume all CPU's in SMP system are the same */ /* Assume all CPUs in SMP system are the same */
if (cpu_count == 0) { if (cpu_count == 0) {
if (!(strncmp(temp_string, "vendor", 6))) if (!(strncmp(temp_string, "vendor", 6)))
strncpy(vendor_string, parse_line(temp_string), BUFSIZ); strncpy(vendor_string, parse_line(temp_string), BUFSIZ);
if (!strncmp(temp_string, "family", strlen("family"))) if (!strncmp(temp_string, "family", strlen("family")))
strncpy(family_string, parse_line(temp_string), BUFSIZ); strncpy(family_string, parse_line(temp_string), BUFSIZ);
/* /*
** note for later check the model line ** note for later check the model line
** now this line is useless ** now this line is useless
*/ */
if (!(strncmp(temp_string, "model", strlen("model")))) if (!(strncmp(temp_string, "model", strlen("model"))))
skipping to change at line 54 skipping to change at line 54
rev_int = atoi(parse_line(temp_string)); rev_int = atoi(parse_line(temp_string));
if (!(strncmp(temp_string, "cpu MHz", 6))) if (!(strncmp(temp_string, "cpu MHz", 6)))
megahertz = atof(parse_line(temp_string)); megahertz = atof(parse_line(temp_string));
} }
/* Ugh why must people play with capitalization */ /* Ugh why must people play with capitalization */
if ( !(strncmp(temp_string, "bogomips", 8)) || if ( !(strncmp(temp_string, "bogomips", 8)) ||
!(strncmp(temp_string, "BogoMips", 8)) || !(strncmp(temp_string, "BogoMips", 8)) ||
!(strncmp(temp_string, "BogoMIPS", 8))) !(strncmp(temp_string, "BogoMIPS", 8)))
{ {
bogomips += atof(parse_line(temp_string)); bogomips += atof(parse_line(temp_string));
cpu_count++; /* Cheating way to detect number of intel CPU's */ cpu_count++; /* Cheating way to detect number of intel CPUs */
} }
} }
} }
/* Re-arrange some of the strings for best results */ /* Re-arrange some of the strings for best results */
if (family_string[0] == 0) if (family_string[0] == 0)
strncpy(cpu_info->chip_type, "Unknown", 9); strncpy(cpu_info->chip_type, "Unknown", 9);
else else
strncpy(cpu_info->chip_type, family_string, SYSINFO_CHIP_TYPE_SIZE); strncpy(cpu_info->chip_type, family_string, SYSINFO_CHIP_TYPE_SIZE);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)