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

linuxÏÂÇý¶¯Ê§°Ü£¬Çë¿´³ÌÐò /dev/simple_char

/////////////////////////////////////////¼òµ¥µÄÇý¶¯³ÌÐò£º
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <asm/hardware.h>
#include <linux/interrupt.h>
#include <linux/workqueue.h>
#define SIMPLE_CHAR_MAJOR 233
// ------------------- READ ------------------------
static ssize_t simplechar_read (struct file * file ,char *buf, size_t count, loff_t
*offset)
{
printk ("simplechar_read has been called \n");
return 0;
}
// ------------------- WRITE -----------------------
static ssize_t simplechar_write (struct file * file ,const char *buf, size_t count,
loff_t *offset)
{
printk ("simplechar_write has been called \n");
return 0;
}
// ------------------- IOCTL -----------------------
int simplechar_ioctl (struct inode * inode ,struct file * file, unsigned int cmd,
unsigned long arg)
{
printk ("simplechar_ioctl has been called \n");
return 0;
}
// ----------------


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

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

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

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

ÓйØlinux°²×°½Å±¾kickstartµÄ±àд

ÎÒÖ®Ç°ÖÆ×÷µÄlinux×Ô¶¯°²×°isoÒѾ­³É¹¦ÁË£¬ÏÖÔÚÏë¶ÔÆä½øÐÐһЩ¶¨ÖÆÐ޸쬱ÈÈ磬¸ü¸ÄgrubͼƬµÈ¡£
ÎÒÔÚks.cfgµÄ%post¶ÎÀïÃæÊÇÕâÑùдµÄ£º
%post --nochroot
# Move the contents of the tar into their new locati ......

linuxÏÂÔõÑùÈÃ×Ô¼ºÐ´µÄ³ÌÐòÔÚÈκÎĿ¼¶¼¿ÉÒÔÓÃ

ÔÚlinuxÏÂдµÄһЩС³ÌÐòºÍ½Å²½£¬Ã¿´ÎÒªÔËÐж¼ÓÐÇл»µ½ËüËùÔÚµÄĿ¼£¬
ÔõÑùÈÃËüÔÚÆäËûĿ¼Ҳ¿ÉÒÔÓÃÄØ£¿¾ÍÈçÓÃvi»òlsÕâЩÃüÁîÒ»Ñù
³¢ÊÔ¹ýÌí¼Ó»·¾³±äÁ¿£¬µ«²»³É¹¦£¬²»¶®
ûÓÐÈ˻شð

ÏñviÄÇЩ£¬ËüÃÇËùÔÚµÄĿ¼¶¼Å ......

Fedora LinuxÏÂjavaÖÐÎÄÎÊÌâ¡£

RT
javaµÄһЩ½çÃæÊÇ·½¿é¡£Ó¦¸ÃÊÇ×Ö·ûÎÊÌâ°É¡£
ÎÒÓõÄÊÇFedora11.ÇëÎÊÔõô½â¾ö°¡£¿
°££¬Ã»ÓÐÈ˻شðÎÒ

Ã²ËÆlinuxϵÄ×Ö·ûÊÇutf-8 ÊÇÓÃeclipseô£¿ Êǵϰ£¬°ÑËü¸Ä»Øgbk¾Í¿ÉÒÔÁË¡£

ϵͳÖÐÎÄ×ÖÌå°²×°ÁËÂð£¿
Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ