mirror of
https://github.com/clockworkpi/WiringPi.git
synced 2026-01-24 00:44:44 +01:00
Minor changes to messages being printed from wiringPiSetup()
Changed built to work marginally better.
This commit is contained in:
parent
13bbba7a22
commit
c121349a7b
1
build
1
build
@ -26,6 +26,7 @@ else
|
|||||||
echo
|
echo
|
||||||
echo "WiringPi library"
|
echo "WiringPi library"
|
||||||
cd wiringPi
|
cd wiringPi
|
||||||
|
sudo make uninstall
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
echo
|
echo
|
||||||
|
|||||||
@ -1166,7 +1166,7 @@ int wiringPiSetup (void)
|
|||||||
|
|
||||||
if (geteuid () != 0)
|
if (geteuid () != 0)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Must be root to call wiringPiSetup(). (Did you forget sudo?)\n") ;
|
fprintf (stderr, "wiringPi:\n Must be root to call wiringPiSetup().\n (Did you forget sudo?)\n") ;
|
||||||
exit (EXIT_FAILURE) ;
|
exit (EXIT_FAILURE) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1203,7 +1203,8 @@ int wiringPiSetup (void)
|
|||||||
|
|
||||||
if ((fd = open ("/dev/mem", O_RDWR | O_SYNC) ) < 0)
|
if ((fd = open ("/dev/mem", O_RDWR | O_SYNC) ) < 0)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "wiringPiSetup: Unable to open /dev/mem: %s\n", strerror (errno)) ;
|
if (wiringPiDebug)
|
||||||
|
fprintf (stderr, "wiringPiSetup: Unable to open /dev/mem: %s\n", strerror (errno)) ;
|
||||||
return -1 ;
|
return -1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user