Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ÃüÁîÐÐ

LinuxÌṩÁË´óÁ¿µÄÃüÁÀûÓÃËü¿ÉÒÔÓÐЧµØÍê³É´óÁ¿µÄ¹¤×÷£¬Èç´ÅÅ̲Ù×÷¡¢Îļþ´æÈ¡¡¢Ä¿Â¼²Ù×÷¡¢½ø³Ì¹ÜÀí¡¢ÎļþȨÏÞÉ趨µÈ¡£ËùÒÔ£¬ÔÚLinuxϵͳÉϹ¤×÷Àë²»¿ªÊ¹ÓÃϵͳÌṩµÄÃüÁî¡£ÒªÏëÕæÕýÀí½âLinuxϵͳ£¬¾Í±ØÐë´ÓLinuxÃüÁîѧÆð£¬Í¨¹ý»ù´¡µÄÃüÁîѧϰ¿ÉÒÔ½øÒ»²½Àí½âLinuxϵͳ¡£
²»Í¬Linux·¢ÐаæµÄÃüÁîÊýÁ¿²»Ò»Ñù£¬µ«Linux·¢ÐÐ°æ± ......

Ó²Å̰²×°linux rhel 5 ³¬¼¶¼òµ¥

Ê×ÏÈÏÂÔØÒ»¸ögrubfordos£¬´ÓÕâÀïϾÍÊÇÁË£¬http://download.csdn.net/source/1326121
ºÜСµÄ£¬²Å190k×óÓÒ£¬Ö±½Ó·ÅÖÃÔÚcÅÌ£¬È»ºó£¬´ò¿ªcÅÌ£¬ÔÚÎļþ¼ÐÑ¡ÏîÀïÃæ£¬°ÑϵͳÒþ²ØÑ¡Ïî´ò¿ª£¬ÏµÍ³±£»¤ÎļþÒ²´ò¿ª£¬¾Í¿ÉÒÔ¿´µ½Ò»¸öboot.iniÎļþ£¬ÔÚboot.iniÀïÃæÌí¼ÓÒ»C£º\grldr="grub for dos"
OK ¡£
Æô¶¯Ã»ÓÐÎÊÌâÁË¡£
°ÑlinuxµÄ°²× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ