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

ubuntuÏÂlinuxÄÚºËÄ£¿é±à³Ì module.hµÄÎÊÌâ

ÎÒÏÂÔØÁËÒ»¸ölinux-2.6.31.5µÄÄںˣ¬½øÐÐÁ˱àÒë
È»ºó¿ªÊ¼±àд×Ô¼ºµÄÐéÄâ×Ö·ûÉ豸Çý¶¯
/**
*rwbuf.h,  driver for virtual char-device
*/

#define  RWBUF_NAME  "rwbuf"        // É豸Îļþ /dev/rwbuf
#define  RWBUF_DEV      "/dev/rwbuf"  // device path
#define  RWBUF_MAJOR  60              // Ö÷É豸ºÅ
#define  RWBUF_CLEAR  0x909090    // IO Ctrl Command
ÉÏÃæÊǺêµÄÍ·Îļþ
#include "rwbuff.h"
#include <unistd.h>
#include <linux/kernel.h> //for kernel programming
#include <linux/module.h> //for kernel module struct
#include <linux/init.h>
#include <linux/fs.h> //struct file_operations
#include <sys/types.h>

static struct file_operations rwbuf_fpos = {
open: rwbuf_open,
release: rwbuf_close,
read: rwbuf_read,
write: rwbuf_write,
ioctl: rwbuf_ioctl,
};

int init_module()
{
printk("Hello world\n");
if(register_chrdev(RWBUF_MAJOR,RWBUF_NAME,&rwbuf_fpos)){
printk("register error\n");
return -1;
}
else
printk("register ok\n");
return 0;
}

void cleanup_module()
{


Ïà¹ØÎÊ´ð£º

ʹÓÃStruts2ÉÏ´«Îļþ£¬ÔÚlinuxϱ¨´í

ʹÓÃStruts2ÉÏ´«Îļþ£¬ÔÚlinuxϱ¨´í
2009-09-29 14:56:20,801 [org.apache.struts2.interceptor.FileUploadInterceptor]-[ERROR] Processing of multipart/form-data request failed. c:/temp/upload__1dcd07ee_12 ......

Linux Socket HTTPÇëÇóµÄÎÊÌ⣬¸ßÊÖ½ø£¡

СµÜ×î½üÐèÒªÒ»¸öÓÃsocket»ñÈ¡htmlÎĵµµÄ´úÂ룬µ«ÊÇÀÏÊDz»ÄÜ»ñÈ¡ÍêÕûµÄhtmlÔ´Âë¡£Ô­Òò²»Ã÷£¬Íû¸ßÊÖÖ¸µã£¡
C/C++ code:

char *Http_GET(char *host,int port,char *data) //·¢ËÍGETÇëÇó
{
char response[2 ......

¹ØÓÚLinux gcc±àÒëÆ÷µÄÎÊÌâ

Ô­ÏȵÄGCC°æ±¾Îª4.1.2,ÎÒÖØÐ±àÒë°²×°ÁËGCC4.3.2£¬µ«ÊDZàÒëÍê³ÌÐòÔËÐгÌÐòʱ»á³öÏÖversion `GLIBCXX_3.4.9' not found Õâ¸öÎÊÌâ.ÔÚÍøÉÏÃæ²éÁËÒ»ÏÂÊÇÈíÁ¬½ÓµÄÎÊÌâ¡£µ«ÊDZ¾È˶ÔLinux²»Ì«ÊìϤ£¬¡°Ó¦¸ÃÖÆ×÷RPM°üÈ»ºó ......

linux vsftp ¸ü¸ÄÉÏΰĿ¼

linux vsftpd Äܲ»Äܸü¸ÄĬÈϵÄFTPÉÏ´«Ä¿Â¼?
ʹÓÃftpµÇ¼£¬»áµÇ¼µ½/home/ftp Õâ¸öĿ¼£¬ÎÒÏë¸ü¸Äµ½ÆäËûµÄĿ¼£¬ÔõôÅäÖÃÄØ

Çë¸ßÊִͽÌß¹£¬¼±¼±¼±£¡
ÓÐЩftp¹¤¾ß¿ÉÒÔÖ±½Ó×Ô¼ºÐ´Ä¿Â¼µÄ°É£¬Õâ¸öĿ¼Ӧ¸Ã¾ÍÊ ......

ÓйØlinux kernelµÄÒÉÎÊ

¸Õ²Å·¢ÏÖÓÐ×îеÄlinux kernel·¢²¼ÁË£¬ÎÒÒ²ÊǸölinux°®ºÃÕߣ¬Ö»²»¹ýÊǸöÐÂÊÖ£¬Ê²Ã´¶¼²»¶®£¬ÎÒÏëÎÊһϣ¬Èç¹ûÎÒÓÐkernelµÄ»°£¬ÎÒÄܱàÒë³É×Ô¼ºµÄϵͳÂð£¿ÊDz»ÊÇÓÃkernelÔÙÅäÉϸö×ÀÃæ»·¾³¾Í¿ÉÒÔ×ö³É×Ô¼ºµÄ²Ù×÷ÏµÍ³ÄØ£¿Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ