Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux¿éÉ豸Çý¶¯(2) ¿éÇý¶¯ÖÐÏà¹ØÏà¹ØÄ£¿éÄ£°å


1.¿éÉ豸Çý¶¯µÄÄ£¿é¼ÓÔØÓëÐ¶ÔØ
1)¿éÉ豸Çý¶¯µÄÄ£¿é¼ÓÔØÍê³ÉµÄ¹¤×÷ÈçÏÂ:
Ø ·ÖÅä,³õʼ»¯ÇëÇó¶ÓÁÐ,°ó¶¨ÇëÇó¶ÓÁкÍÇëÇóº¯Êý
Ø ·ÖÅä,³õʼ»¯gendisk,¸øgendiskµÄmajor,fops,queueµÈ³ÉÔ±¸³Öµ,×îºóÌí¼Ógendisk.
Ø ×¢²á¿éÉ豸Çý¶¯.
´úÂë1:ʹÓÃblk_alloc_queueº¯ÊýÍê³É¿éÉ豸Çý¶¯µÄÄ£¿é¼ÓÔØÄ£°å
    static int __init xxx_init(void){
        //·ÖÅägendisk
        xxx_disks = alloc_disk(1);
        if(!xxx_disks){
            goto out;
        }
        //¿éÉ豸Çý¶¯×¢²á
        if(register_blkdev(xxx_MAJOR, "xxx"){
            err = -EIO;
            goto out;
        }
        //"ÇëÇó¶ÓÁÐ"·ÖÅä
        xxx_queue = blk_alloc_queue(GFP_KERNEL);
        if(!xxx_queue){
            goto out_queue;
        }
        blk_queue_make_request(xxx_queue, &xxx_make_request);//°ó¶¨"ÖÆÔìÇëÇó"º¯Êý
        blk_queue_hardsect_size(xxx_queue,xxx_blocksize);//¸æÖªÄÚºËÓ²¼þÉÈÇø³ß´ç
        //gendisk³õʼ»¯
        xxx_disks->major = xxx_MAJOR;
        xxx_disks->first_minor = 0


Ïà¹ØÎĵµ£º

ÔÚlinuxÏÂʵÏÖweb qqµÄ×ÀÃæ»¯


´´½¨×ÀÃæÍ¼±ê
Ŀǰ½«ÍøÂçÓ¦ÓÃÀ©Õ¹µ½×ÀÃæÊÇÒ»¸öÇ÷ÊÆ£¬´æÔÚןܶà½â¾ö·½°¸£¬±¾ÎÄÒÔ Mozilla Prism ΪÀý£¬ÀàËÆµÄ·½·¨Í¬ÑùÊÊÓÃÓÚ Google Chrome ¡£
1. µ½ Mozilla Prism µÄÍøÕ¾ÉÏÏÂÔØ Prism£¬µã»÷ Download Now Ö®ºó»áÌáʾÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÒÔ Mozilla Firefox À©Õ¹µÄ·½Ê½£¬ÊʺÏÒѾ­°²×°ÓÐ Firefox µÄÅóÓÑ£»Ò»Ö ......

LinuxÄÚºËÈëÃÅ£¨Æß£©—— ±ØÒªµÄ±àÒë֪ʶ

ËùÓеÄÄں˴úÂ룬»ù±¾¶¼°üº¬ÁËinclude/linux/compile.hÕâ¸öÎļþ£¬ËùÒÔËüÊÇ»ù´¡£¬º­¸ÇÁË·ÖÎöÄÚºËËùÐèÒªµÄһЩÁбàÒë֪ʶ£¬±¾²©¾Í·ÖÎö·ÖÎöÕâ¸öÎļþÀïµÄ´úÂ룺
#ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H
#ifndef __ASSEMBLY__
Ê×ÏÈÓ¡ÈëÑÛÁ±µÄÊǶÔ__ASSEMBLY__Õâ¸öºêµÄÅжϣ¬Õâ¸ö±äÁ¿Êµ¼ÊÊÇÔÚ±àÒë»ã±à´úÂëµÄÊ ......

linux³£ÓÃÃüÁîСȫ

1.±ä¸üÓû§£º su root   »ò su - ×¢Ò⣨ÈôÖ»ÓÃsu£¬ÔòÖ»»»Óû§£¬²»»»shell£©¡£
2.´´½¨Îļþ¼Ð£º mkdir -m777 tool ´´½¨too²¢ÉèÖÃȨÏÞ mkdir -p tool2/tool3 Á¬¼¶´´½¨Îļþ¼Ð¡£
3.ɾ³ýÎļþ»òÎļþ¼Ð£º rm -r  tool2 µÝ¹éɾ³ý£¬Á¬Í¬×ÓĿ¼һÆðɾ³ý¡£ rm -fr ²»ÓÃÌáʾ£¬Ö±½ÓÇ¿ÖÆµÝ¹éɾ³ý¡£
4.ÒÆ¶¯Ä¿Â¼£º mv -iv ......

LinuxÉ豸ģÐÍÖ®ttyÇý¶¯¼Ü¹¹·ÖÎö


LinuxÉ豸ģÐÍÖ®ttyÇý¶¯¼Ü¹¹·ÖÎö
 
À´Ô´: ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º 2008.07.25 16:24¡¡(¹²ÓÐ0ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
 
------------------------------------------
±¾ÎÄϵ±¾Õ¾Ô­´´,»¶Ó­×ªÔØ!
×ªÔØÇë×¢Ã÷³ö´¦:http://ericxiao.cublog.cn/
------------------------------------------
Ò»£ºÇ°ÑÔ
TtyÕâ¸öÃû³Æ ......

Linux/Unix WebÓ¦Ó÷þÎñÆ÷°²×°ÅäÖÃ

      ¸ù¾Ý¹¤×÷»·¾³µÄÐèÇó£¬ÐèÒªÕÆÎÕLinux/Unix»·¾³Ï½øÐÐÈí¼þ°²×°Î¬»¤ÒÔ¼°Ïà¹ØÅäÖõȼ¼ÄÜ¡£ÕâÀォÎÒµÄʹÓÃÐĵüǼÏÂÀ´¸ú´ó¼Ò·ÖÏíһϡ£ÉÏһƪÖ÷Òª½²½âÁËÊý¾Ý¿âµÄ°²×°(postgresql)¡£ÏÖÔÚ¾ÍWebÓ¦Ó÷þÎñÆ÷[Apache]µÄ°²×°½øÐн²½â(×¢£ºÒÔÉϰ²×°¾ùÒÔÔ´´úÂ뷽ʽ½øÐа²×°)¡£ÒÔÏÂʹÓõÄLinuxϵͳÊǰ²×°Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ