~ubuntu-branches/ubuntu/wily/hwinfo/wily

« back to all changes in this revision

Viewing changes to debian/patches/cpu.c-alpha_bogo

  • Committer: Bazaar Package Importer
  • Author(s): James Vega
  • Date: 2006-11-03 07:28:15 UTC
  • mfrom: (1.2.1 upstream) (3.1.7 edgy)
  • Revision ID: james.westby@ubuntu.com-20061103072815-7g9d6kzk0xn54159
Add cpu.c-alpha_bogo patch, which fixes a FTBFS on alpha because of an
undefined variable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: src/hd/cpu.c
 
2
===================================================================
 
3
--- src/hd/cpu.c.orig
 
4
+++ src/hd/cpu.c
 
5
@@ -105,6 +105,7 @@
 
6
 #ifdef __alpha__
 
7
   char model_id[80], system_id[80], serial_number[80], platform[80];
 
8
   unsigned cpu_variation, cpu_revision, u, hz;
 
9
+  double bogo;
 
10
   cpu_info_t *ct1;
 
11
 #endif
 
12
 
 
13
@@ -134,6 +135,7 @@
 
14
 #ifdef __alpha__
 
15
   *model_id = *system_id = *serial_number = *platform = 0;
 
16
   cpu_variation = cpu_revision = hz = 0;
 
17
+  bogo = 0;
 
18
 
 
19
   for(sl = hd_data->cpu; sl; sl = sl->next) {
 
20
     if(sscanf(sl->str, "cpu model : %79[^\n]", model_id) == 1) continue;
 
21
@@ -144,6 +146,7 @@
 
22
     if(sscanf(sl->str, "cpus detected : %u", &cpus) == 1) continue;
 
23
     if(sscanf(sl->str, "cycle frequency [Hz] : %u", &hz) == 1) continue;
 
24
     if(sscanf(sl->str, "system variation : %79[^\n]", platform) == 1) continue;
 
25
+    if(sscanf(sl->str, "BogoMIPS : %lg", &bogo) == 1) continue;
 
26
   }
 
27
 
 
28
   if(*model_id || *system_id) {        /* at least one of those */