summaryrefslogtreecommitdiff
path: root/dev-libs/wiringPi/files/2.44-pseudo-cpuinfo.patch
blob: 888afe482d6c63c9d1fb8aee110185e2b14f3d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c
index a8f5963..73bee7b 100644
--- a/wiringPi/wiringPi.c
+++ b/wiringPi/wiringPi.c
@@ -678,7 +678,7 @@ int wiringPiFailure (int fatal, const char *message, ...)
 
 static void piGpioLayoutOops (const char *why)
 {
-  fprintf (stderr, "Oops: Unable to determine board revision from /proc/cpuinfo\n") ;
+  fprintf (stderr, "Oops: Unable to determine board revision from /etc/wiringpi/cpuinfo\n") ;
   fprintf (stderr, " -> %s\n", why) ;
   fprintf (stderr, " ->  You'd best google the error to find out why.\n") ;
 //fprintf (stderr, " ->  http://www.raspberrypi.org/phpBB3/viewtopic.php?p=184410#p184410\n") ;
@@ -695,8 +695,8 @@ int piGpioLayout (void)
   if (gpioLayout != -1)	// No point checking twice
     return gpioLayout ;
 
-  if ((cpuFd = fopen ("/proc/cpuinfo", "r")) == NULL)
-    piGpioLayoutOops ("Unable to open /proc/cpuinfo") ;
+  if ((cpuFd = fopen ("/etc/wiringpi/cpuinfo", "r")) == NULL)
+    piGpioLayoutOops ("Unable to open /etc/wiringpi/cpuinfo") ;
 
 // Start by looking for the Architecture to make sure we're really running
 //	on a Pi. I'm getting fed-up with people whinging at me because
@@ -891,8 +891,8 @@ void piBoardId (int *model, int *rev, int *mem, int *maker, int *warranty)
 
   (void)piGpioLayout () ;	// Call this first to make sure all's OK. Don't care about the result.
 
-  if ((cpuFd = fopen ("/proc/cpuinfo", "r")) == NULL)
-    piGpioLayoutOops ("Unable to open /proc/cpuinfo") ;
+  if ((cpuFd = fopen ("/etc/wiringpi/cpuinfo", "r")) == NULL)
+    piGpioLayoutOops ("Unable to open /etc/wiringpi/cpuinfo") ;
 
   while (fgets (line, 120, cpuFd) != NULL)
     if (strncmp (line, "Revision", 8) == 0)