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

ÎÒµÄÐéÄâÎļþϵͳ£¨linux)


 
1# ·¢±íÓÚ 2005-11-15 17:34  Ö»¿´¸Ã×÷Õß
  http://www.chinaunix.net ×÷Õß:bierdaci  ·¢±íÓÚ£º2004-05-25 18:59:33
²»ÖªµÀ¸Ã²»¸Ã·¢ÕâÀÊÇÎÒ´Óproc¸ÄÀ´µÄ,¶®ÄÚºËÔ´ÂëµÄ½»Á÷½»Á÷
hello.c
[code:1:3adb123188]
#include "hello.h"
struct inode * hello_get_inode(struct super_block *, int, struct hello_dir_entry *);
/*Õâ¸öº¯ÊýÊÇÖ±½Ó´Ólinux¸´ÖƹýÀ´µÄ£¬×÷ÓþÍÊÇÏÔʾĿ¼ÀïµÄÎļþÃû£¬Ã»ÓÐÕâ¸ö
º¯ÊýÒ²ÐÐÖ»ÊÇÄãÓÃls¡¢dirÃüÁî¿´²»µ½Ä¿Â¼ÏµÄÎļþ¡£*/
int hello_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
printk("hello_readdir\n");
struct hello_dir_entry * de;
unsigned int ino;
int i;
struct inode *inode = filp->f_dentry->d_inode;
ino = inode->i_ino;
de = (struct hello_dir_entry *) inode->u.generic_ip;
if (!de)
return -EINVAL;
i = filp->f_pos;
switch (i) {
case 0:
if (filldir(dirent, ".", 1, i, ino, DT_DIR) < 0)
return 0;
i++;
filp->f_pos++;
/* fall through */
case 1:
if (filldir(dirent, "..", 2, i,
   filp->f_dentry->d_parent->d_inode->i_ino,
   DT_DIR) < 0)
return 0;
i++;
filp->f_pos++;
/* fall through */
default:
de = de->subdir;
i -= 2;
for (;;) {
if (!de)
return 1;
if (!i)
break;
de = de->next;
i--;
}
do {
if (filldir(dirent, de->name, de->namelen, filp->f_pos,
   de->low_ino, de->mode >> 12) < 0)
return 0;
filp->f_pos++;
de = de->next;
} while (de);
}
return 1;
}
int hello_d_revalidate(struct dentry *res, int i){printk("d_revalidate\n");return 0;}
int hello_d_hash(struct dentry *res, struct qstr *name){printk("d_hash\n");return 0;}
int hello_d_compare(struct dentry *res, struct qstr *name, struct qstr *old)
{printk("d_compare\n");return 0;}
int hello_d_delete(struct dentry *res){printk("d_delete\n");return


Ïà¹ØÎĵµ£º

Linux iptableÎĵµ

×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......

LinuxÏÂSUNµÄJREÎÊÌâÈÕÖ¾ÊÕ¼¯

LinuxÏÂSUNµÄJREÎÊÌâÈÕÖ¾ÊÕ¼¯
ÔÚLinuxÏÂʹÓÃSunÌṩµÄJRE£¬µ±·¢Éúcore dumpʱ£¬Èç¹ûÈ·ÈÏÊÇÓÉJREÔì³ÉµÄ£¬Sunͨ³£ÐèÒªÄãÌṩÈÕÖ¾ÒÔ¹©·ÖÎö¡£
ͨ³£ÊÇͨ¹ýÖ´ÐÐpkgapp½Å±¾À´ÊÕ¼¯¡£¸Ã½Å±¾¿ÉÔÚsunÍøÕ¾ÉÏÏÂÔØ£¬Ãû×ÖΪSUN-GDD_pkgapp_linux_redhat.tar.gz¡£
pkgapp¹¤¾ßÐèÒªkshµÄÖ§³Ö£¬Òò´ËÈç¹ûLinuxÉÏûÓа´ÕÕksh£¬±ØÐëÏȰ²×°²Å¿É¡ ......

Ubuntu 10.04 brings Linux closer to the mainstream

Ubuntu 10.04 brings Linux closer to the mainstream
No Windows viruses. Free. Any questions?
Of course. Start with this one: How can an operation system with those virtues, the open-source Linux, remain confined to a tiny minority of desktop and laptop computers at home?
Linux may run TiVo video r ......

Linux JDK and ANT install

Linux JDK and ANT install
linux JDKµÄ°²×°

°²×°JDK
´ÓsunÍøÕ¾ÉÏÖ±½ÓÏÂÔØJDK£ºhttp:
//java.sun.com/j2se/1.4.2
/download.htmlÌṩÁËÁ½¸öÏÂÔØ£º
1¡¢RPM in self-extracting file
(j2sdk-1_4_2_04-linux-i586.bin,
32.77 MB) Õâ¸öÊÇ×Ô½âѹµÄÎļþ£¬ÔÚlinuxÉϰ²×°ÈçÏ£º

chmod u+x
./j2sdk-1_4_2_04-l ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ