瀏覽代碼

Minor changes to messages being printed from wiringPiSetup()

Changed built to work marginally better.
pull/22/head
Gordon Henderson 12 年之前
父節點
當前提交
c121349a7b
共有 2 個檔案被更改,包括 4 行新增2 行删除
  1. +1
    -0
      build
  2. +3
    -2
      wiringPi/wiringPi.c

+ 1
- 0
build 查看文件

@@ -26,6 +26,7 @@ else
echo
echo "WiringPi library"
cd wiringPi
sudo make uninstall
make
sudo make install
echo


+ 3
- 2
wiringPi/wiringPi.c 查看文件

@@ -1166,7 +1166,7 @@ int wiringPiSetup (void)

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) ;
}

@@ -1203,7 +1203,8 @@ int wiringPiSetup (void)

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 ;
}



Loading…
取消
儲存