LinuxÄÇЩʶùÖ®ÎÒÊÇSysfs(8)Ò»Æðɢɢ²½ pathwalk
Ç°Ãæ˵¹ý£¬Ö»ÒªÖªµÀÎļþµÄË÷Òý½ÚµãºÅ£¬¾Í¿ÉÒԵõ½ÄǸöÎļþ¡£µ«ÊÇÎÒÃÇÔÚ²Ù×÷Îļþʱ£¬´ÓûÌý˵˻áÄÃ×ÅË÷Òý½ÚµãºÅÀ´²Ù×÷Îļþ£¬ÎÒÃÇÖ»ÖªµÀÎļþÃû¶øÒÑ¡£ ËüÃÇÊÇÈçºÎ"ºÍг"ÆðÀ´µÄÄØ£¿linux°ÑĿ¼Ҳ¿´³ÉÒ»ÖÖÎļþ£¬ÀïÃæ¼Ç¼×ÅÎļþÃûÓëË÷Òý½ÚµãºÅµÄ¶ÔÓ¦¹Øϵ£¨Ä¿Â¼´æÔÚµÄÔÒò£©¡£±ÈÈçÔÚext3ÎļþϵͳÖУ¬Èç¹ûÎļþÊÇÒ»¸öÄ¿ ¼£¬ÄÇôËüµÄÄÚÈݾÍÊÇһϵÁÐext3_dir_entry_2µÄ½á¹¹
struct ext3_dir_entry_2 {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u8 name_len; /* Name length */
__u8 file_type;
char name[EXT3_NAME_LEN]; /* File name */
};
¾Ù ¸öÀý×Ó£¬±ÈÈçÒª´ò¿ª/home/test/hello.c¡£Ê×ÏÈ£¬ÕÒµ½‘/’£¬¶ÁÈëÆäÄÚÈÝ£¬ÕÒµ½ÃûΪ"home"µÄÎļþµÄË÷Òý½ÚµãºÅ£¬´ò¿ª/homeÕâ¸ö "Îļþ"£¬¶ÁÈëÄÚÈÝ£¬ÕÒµ½ÃûΪ "test" µÄµÄÎļþµÄË÷Òý½ÚµãºÅ£¬Í¬Àí£¬ÔÙ´ò¿ªÎļþ"/home/test"£¬ÕÒµ½ÕÒµ½ÃûΪ"hello.c”µÄÎļþµÄË÷Òý½ÚµãºÅ£¬×îºó¾ÍµÃµ½ /home/test/hello.cÁË¡£Õâ¾ÍÊÇpath_walk()º¯ÊýµÄÔÀí¡£
ÆäÖУ¬¸ù¾ÝÒ»¸öÎļþ¼ÐµÄinode£¬ºÍÒ»¸öÎļþÃûÀ´»ñÈ¡¸ÃÎļþµÄinode½á¹¹µÄº¯Êý£¬¾Í½Ðlookup£¬ËüÊÇinode_operationsÀïÃæµÄº¯Êý¡£
struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
lookup£¬ ¹ËÃû˼Ò壬¾ÍÊDzéÕÒ£¬±ÈÈç²é²éÔÚtestÕâ¸öÎļþ¼ÐÏ£¬ÓÐûÓнÐhello.cµÄÎļþ£¬ÓеĻ°£¬¾Í´Ó´æ´¢½éÖÊÖжÁÈ¡Æäinode½á¹¹¡£²¢ÓÃdentry- >d_inodeÖ¸ÏòËü¡£ËùÒÔ£¬ÎÒÃÇÖ»ÒªÖªµÀÁËÎļþµÄ·¾¶ºÍÃû×Ö£¬×Ü¿ÉÒÔ´Ó¸ùĿ¼¿ªÊ¼£¬Ò»²ãÒ»²ãµÄÍùÏÂ×ߣ¬¶¨Î»µ½Ä³Ò»¸öÎļþ¡£
superblockÓëvfsmount
½Ó ÏÂÀ´»¹Òª½éÉÜÁ½¸öÊý¾Ý½á¹¹£¬superblockºÍvfsmount¡£super_block½á¹¹ÊÇ´ÓËùÓоßÌåµÄÎļþϵͳËù³éÏó³öÀ´µÄÒ»¸ö½á¹¹£¬Ã¿Ò»¸öÎÄ ¼þϵͳʵÀý¶¼»áÓÐÒ»¶ÔÓ¦super_block½á¹¹¡£±ÈÈçÿһ¸öext2µÄ·ÖÇø¾ÍÓÐÒ»¸ösuper_block½á¹¹£¬Ëü¼Ç¼Á˸ÃÎļþϵͳʵÀý(·ÖÇø)µÄij ЩÃèÊöÐÔµÄÐÅÏ¢£¬±ÈÈç¸ÃÎļþϵͳʵÀýµÄÎļþϵͳÀàÐÍ£¬Óжà´ó£¬´ÅÅÌÉÏÿһ¿éµÄ´óС, »¹ÓоÍÊÇsuper_operations¡£ËüÓëinode£¬dentryÒ»Ñù£¬Ö»ÊÇijЩÄÚÈÝÔÚÄÚ´æÖеÄÓ³Ïñ¡£¾Íext2Îļþϵͳ¶øÑÔ£¬É豸Éϵij
Ïà¹ØÎĵµ£º
This is a memo of setting up Suse 10.3 on Mon Mar 17, 5:18 PM
Download Open Suse: http://en.opensuse.org and see http://en.opensuse.org/Download_Help
Summary - These tools were configured to use:
Apache 2.2 web server
Bison 2.3
Flex 2.5.33
Ftp server
Gcc 4.2.1 (C/C++)
Java 1.5.0
Mon ......
±à¼
$netbeans_home/etc/netbeans.conf£¬ÔÚ"netbeans_default_options"ÏîÖÐÌí¼Ó"-J-
Dawt.useSystemAAFontSettings=on --fontsize=12"
p.s:ÈÃËùÓеÄJava³ÌÐò¶¼Ê¹Ó÷´¾â
³Ý£º export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'
------------------------------------------------- ......
Ò»¡¢½ø³Ì¿ØÖÆ£º
fork
´´½¨Ò»¸öнø³Ì
clone
°´Ö¸¶¨Ìõ¼þ´´½¨×Ó
½ø³Ì
execve
ÔËÐпÉÖ´ÐÐÎļþ
exit
ÖÐ
Ö¹½ø³Ì
_exit
Á¢¼´ÖÐÖ¹µ±Ç°½ø³Ì
getdtablesize
½ø
³ÌËùÄÜ´ò¿ªµÄ×î´óÎļþÊý
getpgid
»ñÈ¡Ö¸¶¨½ø³Ì×é±êʶºÅ
setpgid
Éè
ÖÃÖ¸¶¨½ø³Ì×é±êÖ¾ºÅ
getpgrp
»ñÈ¡µ±Ç°½ø³Ì×é±êʶºÅ
setpgrp
Éè
Öõ±Ç°½ø³Ì×é± ......
select()µÄ»úÖÆÖÐÌṩһfd_setµÄÊý¾Ý½á¹¹£¬Êµ¼ÊÉÏÊÇÒ»longÀàÐ͵ÄÊý×飬 ÿһ¸öÊý×éÔªËض¼ÄÜÓëÒ»´ò¿ªµÄÎļþ¾ä±ú£¨²»¹ÜÊÇSocket¾ä±ú,»¹ÊÇÆäËû Îļþ»òÃüÃû¹ÜµÀ»òÉ豸¾ä±ú£©½¨Á¢ÁªÏµ£¬½¨Á¢ÁªÏµµÄ¹¤×÷ÓɳÌÐòÔ±Íê³É£¬ µ±µ÷ÓÃselect()ʱ£¬ÓÉÄں˸ù¾ÝIO״̬ÐÞ¸Äfd_setµÄÄÚÈÝ£¬ÓÉ´ËÀ´Í¨ÖªÖ´ ÐÐÁËselect()µÄ½ø³ÌÄ ......