linux c mkdir´´½¨µÝ¹éĿ¼
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define err(msg) perror(msg)
static void mkdirs(const char *dir)
{
char tmp[1024];
char *p;
if (strlen(dir) == 0 || dir == NULL) {
printf("strlen(dir) is 0 or dir is NULL.\n");
return;
}
memset(tmp, 0, sizeof(tmp));
strncpy(tmp, dir, strlen(dir));
if (tmp[0] == '/' && tmp[1]== '/')
p = strchr(tmp + 2, '/');
else
p = strchr(tmp, '/');
if (p) {
*p = '\0';
mkdir(tmp,0777);
chdir(tmp);
} else {
mkdir(tmp,0777);
chdir(tmp);
return;
}
mkdirs(p + 1);
}
int main(void)
{
 
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
½ñÌìÖÕÓÚÄõ½moto¹Ù·½SDK£¬ÊÇfor A1200µÄ£¬°üÀ¨toolchianºÍEZX¿â¼°Í·Îļþ£¬¸ÃSDKÒ²ÊÊÓÃÓÚmoto E6. °´ÕÕ°²×°Ö¸µ¼Îĵµ°²×°ºÃSDK²¢Ö´Ðнű¾ÉèÖúû·¾³±äÁ¿ºó£¬Ê×ÏÈÊÇbuildÒ»¸ö×î¼òµ¥µÄsample³ÌÐòhello£¬ÒÔÑéÖ¤SDKÊÇ·ñ°²×°ÕýÈ·¡£ÔËÐÐqmakeÈ´³öÏÖÈçÏ´íÎó£º
~/workspace/devtools/moto-sdk/sample/gui/hello$ qmake hello.pro&n ......
±¾ÊÀ¼ÍµÚÒ»¸öÊ®Ä꣬¼´½«¹ýÈ¥¡£»Ø¹ËÒÔÍù£¬²ÅÄÜ¿´ÇåÏÖÔÚ£¬ÎÒÓм¸¾ä»°ÒªËµ¡£
¼ÇµÃ£¬ÔÚÊ®Äê֮ǰ£¬ÈËÃÇÖ»ÄÜÍæÍæÃÀ¹úºìñµÄ Linux ×ÀÃ棨ÌرðÊÇ 6.2 °æ±¾£©£¬ÕûÌì sudo £¨¼´ Super User do £©£¬ÈÎƾ¼¤Çé·ºÀÄ¡£µ½ÁË 2001 Äê 1 Ô£¬ Linux 2.4 Õýʽ·¢²¼£¬Ê×´ÎÖ§³Ö USB ºÍÀ¶ÑÀ¼¼Êõ£¬ÒÔ¼° ext ......
¡¡¡¡Õâ¶Îʱ¼äÀÏÅöµ½ÓÐÈËÎʼ°¸÷¸öLinux°æ±¾µÄ±¾µØrootÃÜÂëÆƽⷽ·¨£¬ÎÒÕâÀï×Ô¼ºÒÔ¼°ÔÚÍøÂçÉÏËѼ¯ÁËЩ×ÊÁÏ£¬Ï£Íû¶Ô¿´µ½ÁËÕâÎÄÕ¶øÓÖÇ¡ºÃÓõõ½µÄ¼¼ÊõÈËÔ±Óеã°ïÖú£º
(Ò»)RedHat/CentOS/Fedora ϵͳÃÜÂëÆƽâ
¡¡¡¡1.ÔÚgrubÑ¡Ïî²Ëµ¥°´E½øÈë±à¼Ä£Ê½
¡¡¡¡2.±à¼kernel ÄÇÐÐ×îºó¼ÓÉÏ¿Õ¸ñS (»òÕß¿Õ¸ñSingle)
¡¡¡¡3.°´B£¬Æô¶¯µ ......