linuxÉ豸Çý¶¯¿ª·¢Ïê½â——globalmem
³£¼ûµÄÁ½ÖÖ´íÎó£º
1.ÔÚ²åÈëÄ£¿éµÄʱºò³öÏÖÈçÏÂÎÊÌ⣺
# insmod globalmem.ko insmod: error inserting 'globalmem.ko': -1 Device or resource busy
ANSWER:Ö÷É豸ºÅ±»Õ¼ÓÃÁË£¬»»ÁíÒ»¸ö¡£ Äã°Ñglobalmem.cÎļþÀïÃæµÄºê¶¨ÒåÄÇÀï¸ÄΪ226»òÆäËû£¬È»ºóÔÙ±àÒë¾Í¿ÉÒÔ²åÈëÁË£¡
Ìرð×¢Ò⣺ Èç¹û»»ÁËÖ÷É豸ºÅÒÔºó£¬ÏÂÃæ½Ó×Å´´½¨½ÚµãµÄʱºòÒ²Òª¸Ã£¬·ñÔò³öÏÖÏÂÃæ´íÎó£º
# mknod /dev/globalmem c 254 0 /*ÕâÀïµÄ254¸úÒÑÐ޸ĵÄÖ÷É豸ºÅ228²»Ò»ÖÂ*/
# echo 'hello world' > /dev/globalmem
/bin/sh: can't create /dev/globalmem: No such device or address
½â¾ö°ì·¨£º
# rm /dev/globalmem
# mknod /dev/globalmem c 226 0
# echo 'hello world' > /dev/globalmem
written 12 bytes(s) from 0
2.¼ÓÔغʹ´½¨É豸½Úµã¶¼Êdzɹ¦µÄ£®µ«¾ÍÊÇÓÃcatÃüÁî²é¿´Ê±£¬ËäÈ»¶Á³öÁËÕýÈ·µÄ×Ö·û£¬È´×ÜÊÇÔÚ×îºó»¹Òª¼ÓÉÏÒ»¾äÌáʾ£¢ÕÒ²»µ½É豸»òµØÖ·£¢£®²»ÖªÎªºÎ»á¶à³öÕâ¾äÀ´£®
# echo 'hello world!' > /dev/globalmem
written 13 bytes(s) from 0
# cat /dev/
/dev/console /dev/globalmem /dev/null
# cat /dev/globalmem
read 4096 bytes(s) from 0
hello world!
cat: read error: No such device or address
#
ANSWER:ÆäʵûÎÊÌ⣬
<1>Äã°Ñglobalmem_readº¯ÊýÖеÄif (p >£½ GLOBALMEM_SIZE)¸ÄΪif (p > GLOBALMEM_SIZE)¾ÍºÃÁË¡£¾ßÌåÔÒòÊÇÒ»´Îµ÷ÓÃcat»á¶ÁÁ½´Î£¬Ã¿´Î¶ÁÈ¡4096¸ö×Ö½Ú£¬´ËʱÎļþ¶ÁÖ¸Õëppos¾ÍÊÇ4096ÁË£¬ÔÚµÚ¶þ´Î¶ÁµÄʱºò£¬µ½if (p >£½ GLOBALMEM_SIZE)ÕâÀïÌõ¼þΪÕ棬globalmem_read¾Í·µ»ØENXIO´íÎóÁË£¬ËùÒԲŻá³öÏÖNo such device or address"´íÎó¡£²»ÖªµÀÔÚËÎÀÏʦµÄ»ú×ÓÉÏΪʲô¾ÍÊÇÕýÈ·µÄ£¿
<2> Ëᦻª £º·µ»Ø´íÎóÖµ²ÅÊÇÕýÈ·µÄ£¬ÒòΪ¶ÁµÄλÖÃÒѾԽ½ç£¬ËùÒÔÒª·µ»Ø´íÎ󡣸÷µ»Ø´íÎóµÄʱºò·µ»ØÕýÈ·£¬ÄǾÍÊÇ´íÎ󡣸ijÉif (p > GLOBALMEM_SIZE)ÊÇ´íÎóµÄ¡£
<3> ¸ù¾ÝÉÏÃæÁ½µã¿ÉÒÔС½áÊéÉÏÊÇûÓдíÎóµÄ¡£Êä³öµÄ´íÎóÐÅÏ¢ÊÇÕý³£µÄdebugÐÅÏ¢£¬Ç§²»¸ÃÍò²»¸Ã¾ÍÊÇcatµ÷ÓÃÁËreadÁ½´Î¡£
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
¹Ù·½ÍøÕ¾£ºhttp://www.isc.org
Ò»£ºÔ´Âë°üµÄ°²×°ºÍÅäÖÃ
ÏÂÔØÔ´Âë°üÎļþ£ºhttp://ftp.isc.org/isc/bind9/9.4.2/bind-9.4.2.tar.gz
½âѹ²¢°²×°bind
Tar –zxvf bind-9.4.2.tar.gz
ÅäÖÃÔ´Âë°ü£º
./configure --prefix=/usr/local/named --enable-threads #--enable-threads¿ªÆô¶àÏ̴߳¦ÀíÄÜÁ¦
......
Q:
I
keep getting
errors due to library functions being undefined,
but I'm #including all
the right header files.
A:
In the general case of calling code in an
external library,
using #include
to pull in
the right header file(s) is only half
of the story; you also have to tell th ......
À´Ô´£ºhttp://www.168-net.com/program/newsnew/data/2005-03/20050325124716723.htm
·½°¸Ò»
±¾ÎÄÏêϸ½éÉÜrsync·þÎñµÄ°²×°ÅäÖÃÒÔ¼°ÈçºÎÀûÓÃrsync±£³ÖLinux·þÎñÆ÷¼äµÄÎļþͬ²½¡£
¡¡¡¡·þÎñÆ÷Ö®¼ä³£³£Òª±£³ÖЩÎļþ»òĿ¼µÄÒ»Ö£¬±ÈÈçһЩ´óµÄÈí¼þÏÂÔØÍøÕ¾£¬ËüÃÇͨ³£Ê¹Óöą̀·þÎñÆ÷À´ÌṩÏÂÔØ·þÎñ¡£µ±Ò»Ì¨·þÎñÆ÷ÉϵÄÎÄ ......