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

Linux ·ÃÎÊfat¸ñʽÎļþϵͳ

Ê×ÏÈÒªµ¼ÈëÕâЩͷÎļþ
#include
#include
#include
#include
#include
#include



È»ºó¿´Ò»ÏÂʵ¼ÊµÄ²Ù×÷


1¡¢²é¿´ÎļþϵͳÐÅÏ¢
asmlinkage long get_files_info(char * filesystem_type)//È¡µÃµ±Ç°Ä¿Â¼µÄÎļþϵͳÐÅÏ¢
{
struct fs_struct *fs ;
struct vfsmount *mnt ;
struct super_block *mnt_sb ;
struct file_system_type *s_type;
read_lock(¤t->fs->lock);
fs = current->fs;
mnt = fs->pwdmnt;
mnt_sb = mnt-> mnt_sb ;
s_type = mnt_sb -> s_type;

printk("PWD Filesystem Type is : %s\n",s_type->name);
copy_to_user(filesystem_type,s_type->name,strlen(s_type->name));

printk("PWD= %ld\n",mnt_sb->s_blocksize);

read_unlock(¤t->fs->lock);
return 0;
}







2¡¢²é¿´fat_boot_sector ÐÅÏ¢
asmlinkage long get_FAT_boot(char * filesystem_type)//È¡µÃfatÎļþϵͳµÄÐÅÏ¢
{
struct fs_struct *fs ;
struct vfsmount *mnt ;
struct super_block *mnt_sb ;
struct buffer_head * bh=NULL;
struct fat_boot_sector *fat_sector;
char c[512];
int len;

read_lock(¤t->fs->lock);
fs = current->fs;
mnt = fs->pwdmnt;
mnt_sb = mnt-> mnt_sb ;
char *fsname=mnt_sb -> s_type->name;
char *sfs="vfat";
if(strcmp(fsname,sfs)==0)//´ËʱÎļþϵͳÊÇvfat
{
sb_min_blocksize(mnt_sb, 512);
bh = sb_bread(mnt_sb, 0);
if(bh!=NULL)
{
fat_sector=(struct fat_boot_sector *)bh->b_data;
len=sprintf(c,"FATÎļþϵͳ¾ßÌå²ÎÊýÈçÏÂ:\n");
len=sprintf(c,"%sbackup boot sector= %d\n",c,fat_sector->backup_boot);
len=sprintf(c,"%ssectors/cluster= %d\n",c,fat_sector->sec_per_clus);
len=sprintf(c,"%snumber of heads= %d\n",c,fat_sector->heads);
len=sprintf(c,"%shidden sectors (unused)= %d\n",c,fat_sector->hidden);
len=sprintf(c,"%smedia code= %d\n",c,fat_sector->media);
len=sprintf(c,"%sbytes per logic


Ïà¹ØÎĵµ£º

Linux µÄ¶àÏ̱߳à³ÌµÄ¸ßЧ¿ª·¢¾­Ñé

2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾­Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄϰ¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......

È¥³ýÐéÄâ»úvmwareÖÐLinuxµÄ±¨¾¯Éù

vi Öйرճö´í bell ÉùÒô
http://blog.csdn.net/coolrocky/archive/2001/06/05/8080.aspx
È¥³ýÐéÄâ»úLinuxµÄ±¨¾¯Éù
http://hi.baidu.com/zjd168/blog/item/c8300846b5a6ec0e6a63e5d8.html
¹Ø±ÕÖ÷°å±¨¾¯Òô
http://linux.chinaunix.net/techdoc/install/2009/05/16/1112897.shtml
linuxÖйرձ¨¾¯ÒôºÍÐ޸ķֱæÂÊ
http ......

LINUXϵͳ±à³ÌÖ®ÈÕÀúʱ¼ä

LINUXÖÐʱ¼äÓÐÁ½ÖÖ£º
1£©ÈÕÀúʱ¼ä
2£©½ø³Ìʱ¼ä
ÈÕÀúʱ¼ä¹ËÃû˼Òå¼´ÓÃÀ´»ñÈ¡ÈÕÀú£»
Ö÷񻃾¼°µ½µÄº¯ÊýÓУº
time(time_t*);
stime(time_t*);
tm* gmtime(time_t*);
tm* localtime(time_t*);
char *strftime(tm*);
char *asctime(tm*);
time_t* mktime(tm*);
Êý¾Ý½á¹¹ÈçÏ£º
time_t
struct tm{
  int tm_se ......

Linux ±à³Ì¾­µäÊé¼®ÍÆ¼ö


     ³ÉΪһÃû¾«Í¨ Linux ³ÌÐòÉè¼ÆµÄ¸ß¼¶³ÌÐòÔ±Ò»Ö±ÊDz»ÉÙÅóÓÑ×Î×ÎÒÔÇóµÄÄ¿±ê¡£¸ù¾ÝÖлªÓ¢²ÅÍøÍ³¼ÆÊý¾Ý£¬±±¾©µØÇø Linux ³ÌÐòÔ±ÔÂнƽ¾ùΪ Windows ³ÌÐòÔ±µÄ 1.8 ±¶¡¢Java ³ÌÐòÔ±µÄ 2.6 ±¶£¬ Linux ³ÌÐòÔ±ÄêÖÕ½±½ðƽ¾ùΪ Windows ³ÌÐòÔ±µÄ 2.9 ±¶¡£Í¬Ê±Êý¾ÝÏÔʾ£¬Ëæ×ʤ×÷¾­ÑéµÄÔö³¤£¬ Linux ³ÌÐòÔ±Ó ......

Linux iptables·À»ðǽ¹¹½¨Ê¾Àý

#!/bin/sh
/sbin/modprobe ip_conntrack_ftp
CONNECTION_TRACKING="1"
ACCEPT_AUTH="0"
DHCP_CLIENT="0"
IPT="/sbin/iptables" # Location of iptables on your system
INTERNET="eth0" # Internet-connected interface
LO ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ