linux 0.11 Îļþϵͳ£¨Èý£©
Ŀ¼ÏîºÍ³¬¼¶¿é£¬½ÚµãµÄ¸ÅÄͬ£¬ËüÔÚÉ豸ÉÏûÓжÔÓ¦µÄ´ÅÅÌÊý¾Ý½á¹¹¡£Ïà·´£¬ËüÊÇĿ¼ÎÄ ¼þµÄÒ»²¿·Ö¡£linuxÖÐĿ¼ҲÊÇÒ»ÖÖÎļþ£¬ÀàÐÍÊÇ'd'¡£µ«ÊÇĿ¼ÖеÄÄÚÈݺÍÆÕͨÎļþ²»Í¬£¬ËüÊÇÓÉĿ¼Ïî×é³ÉµÄ¡£×¢ÒâĿ¼Ïî²»ÊÇĿ¼¡£ÎÒÃǾ³£Ó÷¾¶Ãû Ö´ÐÐÏà¹Ø²Ù×÷£¬Ä¿Â¼Ïî¾ÍÊÇΪÁ˲éÕÒ·½±ãµÄ¡£
struct dirt_entry{
unsigned short inode;
char name[NAME_LEN];
}£»
¿É ÒÔ¿´µ½Ò»¸öĿ¼ÏîÖаüº¬ÁËÎļþµÄi½ÚµãºÅºÍÎļþµÄÃû³Æ¡£Â·¾¶ÓÐÁ½ÖÖ£¬Ò»ÖÖÊǾø¶Ô·¾¶£¬Ò»ÖÖÊÇÏà¶Ô·¾¶¡£±ÈÈç/home/fish¾ÍÊǾø¶Ô·¾¶£¬ËüÒÔ¸ùĿ¼ /Ϊ¿ªÍ·£¬¶ø X11/xorg.conf¾ÍÊÇÏà¶Ô·¾¶£¬ËüÏà¶ÔÓÚĿ¼/etc,Ò²¾ÍÊÇ˵ºóÕߵľø¶Ô·¾¶ÊÇ/etc/X11/xorg.conf¡£Â·¾¶ÊÇÓÉĿ¼Ïî×é³É µÄ¡£Äà /home/fish/fish.cÀ´Ëµ£¬µÚÒ»¸öĿ¼ÊÇ/£¬¼´¸ùĿ¼¡£ÔÚ¸ùĿ¼ÎļþÖÐÓÐÃû×ÖΪhomeµÄĿ¼ÏȻºóͨ¹ýhomeĿ¼ÏîÖеÄi½Úµã¾Í¿ÉÒÔ ÕÒµ½homeÎļþ£¬Í¨¹ýi½ÚµãÖеÄi_mode×ֶοÉÖªËüÊÇÒ»¸öĿ¼£¬ÔÚÕâ¸öÎļþÖÐÓÐÃûΪfishµÄĿ¼ÏȻºó¸ù¾ÝÕâ¸öĿ¼ÏîÖеÄi½ÚµãºÅÕÒµ½fish Îļþ¡£Í¬ÑùÓÉfishµÄinode->i_modeÖªÕâÒ²ÊǸöĿ¼¡£Í¬ÑùÔÚfishÎļþÖÐÕÒµ½ÃûΪfish.cµÄĿ¼Ï¾Í¿ÉÒÔÕÒ³öfish.cµÄ i½Úµã£¬ËÑË÷Íê³É¡£
namei.c ÊÇÄÚºËÖÐ×µÄÒ»¸öÎļþ£¬Ëü°üº¬ÁËÐí¶à¹ØÓÚĿ¼µÄ²Ù×÷£¬Èçfind_entry(´ÓÒ»¸öĿ¼ÖÐËÑË÷Öƶ¨µÄĿ¼Ïî),add_entry(ÍùÖ¸¶¨µÄĿ¼ÖÐÌí ¼ÓÒ»¸öÎļþĿ¼Ïî),get_dir(¸ù¾Ý·¾¶ÃûÕÒµ½Ö¸¶¨µÄĿ¼),dir_namei(·µ»ØÖ¸¶¨Ä¿Â¼µÄi½ÚµãÖ¸Õë),»¹ÓÐnamei(¸ù¾Ý·¾¶ÃûÕÒµ½Ö¸ ¶¨Â·¾¶µÄi½Úµã)µÈµÈ¡£ÎÒÃǾÍÏÈÄÃfind_entryÀ´¿´Ò»Ï¡£
//dir:Ö¸¶¨Ä¿Â¼µÄi½ÚµãÖ¸Õë¡£name:ÎļþÃû,namelen£ºÎļþÃû³¤¶È¡£
//·µ»Ø£º¸ßËÙ»º³åÇøÖ¸ÕëºÍÏàÓ¦µÄĿ¼ÏîÖ¸Õë¡£
static struct buffer_head* find_entry(struct m_inode **dir,const char*name,int namelen,struct dir_entry **res_dir)
{
int entries;
int block ,i;
struct buffer_head *bh;
struct dir_entry *de;
struct super_blocl *sb;
//Èç¹û¶¨ÒåÁËNO_TRUNCATE,ÔòÈç¹ûÎļþÃû´óÓÚ×î´ó³¤¶ÈNAME_LEN,·µ»Ø¡£
Ïà¹ØÎĵµ£º
2.1 LinuxÄÚºËģʽ
µ¥ÄÚºËģʽµÄÄں˿ÉÒÔ´ÖÂԵķÖΪÈý¸ö²ã´Î£ºµ÷Ó÷þÎñµÄÖ÷³ÌÐò²ã¡¢Ö´ÐÐϵͳµ÷ÓõķþÎñ²ãºÍÖ§³Öϵͳµ÷Óõĵײ㺯Êý¡£
2.2 LinuxÄÚºËÌåϵ½á¹¹
LinuxÄÚºËÓÉÎå¸öÄ£¿é×é³É£º½ø³Ìµ÷¶ÈÄ£¿é¡¢ÄÚ´æ¹ÜÀíÄ£¿é¡¢Îļþϵͳģ¿é¡¢½ø³Ì¼äͨР......
linux°²×°£¨ÐéÄâ»ú£©
1.ÄÚ´æÖÁÉÙ256mb
2.Ó²ÅÌÖÁÉÙ2gb£¬ÀíÏëΪ10gbÒÔÉÏ
3.¶àÖØÒýµ¼GRUB
4.IDE¡¢SCSI½Ó¿Ú
IDE½Ó¿ÚÓ²Å̱ÈSCSI½Ó¿ÚÓ²Å̶ÁдËÙ¶ÈÂýµ«¼Û¸ñÏà¶Ô±ãÒË£¬pc×îΪ³£¼û
Ò»°ãһ̨»ú×ÓÓÐÁ½¸öIDE½Ó¿Ú£¨IDE0 IDE1£©
ÿ¸ö½Ó¿Ú¿ÉÒÔÁ¬½ÓÁ¬¸öÓ²ÅÌ£¨Ö÷Å̺ʹÓÅÌ£© ......
ÎļþϵͳºÍÄÚ´æ¹ÜÀí£¬ÒÔ¼°½ø³Ì¹ÜÀíÊDzÙ×÷ϵͳµÄºËÐIJ¿·Ö¡£Êý¾Ýͨ³£ÒÔÎļþµÄÐÎʽ´æ´¢ÔÚÉè ±¸ÉÏ£¬Òò´ËÎļþϵͳµÄ»ù±¾¹¦ÄܾÍÊÇÒÔijÖÖ¸ñʽ´æÈ¡/¿ØÖÆÎļþ¡£0.11°æµÄÄÚºËÖвÉÓÃÁËminix1.0°æµÄÎļþϵͳ¡£ÔÚ×îеÄ2.6°æÄÚºËÖУ¬½èÖúÓÚ VFS£¬ÏµÍ³Ö§³Ö50¶àÖÖÎļþϵͳ¡£
Ê×ÏȽéÉÜÒ»ÏÂminixÎļþϵͳ
minixÎļþϵͳºÍ±ê×¼unixÎļþϵͳ» ......
CurlÊÇLinuxÏÂÒ»¸öºÜÇ¿´óµÄhttpÃüÁîÐй¤¾ß£¬Æ书ÄÜÊ®·ÖÇ¿´ó¡£
1) ¶þ»°²»Ëµ£¬ÏÈ´ÓÕâÀ↑ʼ°É£¡
$ curl http://www.linuxidc.com
»Ø³µÖ®ºó£¬www.linuxidc.com µÄhtml¾ÍÏ¡ÀﻩÀ²µØÏÔʾÔÚÆÁÄ»ÉÏÁË ~
2) àÅ£¬ÒªÏë°Ñ¶Á¹ýÀ´Ò³Ãæ´æÏÂÀ´£¬ÊDz»ÊÇÒªÕâÑùÄØ£¿
$ curl http://www. ......