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

Notes for Advanced Linux Programming 6. Devices


6.  Devices
A device driver hides the hardware device’s communication
protocols from the operating system and allows the system to interact with the
device through a standardized interface.
Processes can communicate with a device driver via
file-like objects.
6.1 Device Types
A character device represents a hardware device that reads
or writes a serial stream of data bytes.
A block device represents a hardware device that reads or
writes data in fixed-size blocks.
6.2 Device Numbers
Linux identifies devices using two numbers: the major
device number and the minor device number.
The major device number specifies which driver the device
corresponds to.
Minor device numbers distinguish individual devices or
components controlled by a single driver.
The special entry /proc/devices lists major device numbers
corresponding to active device drivers currently loaded into the kernel.
[liuchao@localhost ~]$ cat /proc/devices
Character devices:
  1
mem
  4
/dev/vc/0
  4
tty
  4
ttyS
  5
/dev/tty
  5
/dev/console
  5
/dev/ptmx
  6
lp
  7
vcs
 10
misc
 13
input
 14
sound
 21
sg
 29
fb
 99
ppdev
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
216 rfcomm
254 pcmcia
 
Block devices:
  1
ramdisk
  1
ramdisk
  2
fd
  8
sd
  9
md
 22
ide1
 65
sd
 66
sd
 67
sd
 68
sd
 69
sd
 70
sd
 71
sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 device-mapper
254 mdp
 
6.3 Device Entries
Only superuser processes can create block and character
devices using the mknod command or the mknod system call.
To create a device using the mknod command
The first argument is the path of the entry in the file
system.
The second argument is b for a block device or c for a
character device.
Provide the major and minor device numbers as


Ïà¹ØÎĵµ£º

Ubuntu£¨Linux£©Ê¹ÓÃEclipse´î½¨C/C++±àÒë»·¾³

ÕâÁ½Ì죬¸ø×Ô¼ºµçÄÔŪÁË˫ϵͳ£¬³ýÁËÔ­À´µÄWindows 7ϵͳÍ⣬װÉÏÁËLinuxϵͳ£¬Ê¹Óõİ汾ÊÇUbuntu
£¨µã
»÷¿Éµ½ÏàÓ¦µÄÏÂÔØÒ³Ãæ£©¡£¿ªÊ¼ÎÒ×°µÄLinux°æ±¾ÊÇfedora9£¬¶ÔÓÚÒ»¸ö¸ù±¾Ã»½Ó´¥¹ýLinuxϵͳµÄÈ˶øÑÔ£¬Ê¹ÓÃfedora£¬¼òÖ±ÈÃÈ˱ÀÀ£¡£¸ü
±ÀÀ£µÄÊÇ£¬ÎÒÓõÄÓ¢Îİ档ûµÄ°ì·¨£¬ÓÖÖØÐÂÏÂÔØLinux£¬¿Ìµú¡£×°ÏµÍ³¡£×°ÏµÍ³µÄʱºò ......

Security Enhanced LinuxµÄÀúÊ·


       Ò»¸öСÀúÊ·½«ÓÐÖúÓÚ°ïÖúÄúÀí½â Security-Enhanced Linux£¨SELinux£©——¶øÇÒËü±¾ÉíÒ²ÊǶÎÓÐȤµÄÀúÊ·¡£
ÃÀ¹ú¹ú¼Ò°²È«¾Ö
£¨National
Security
Agency£¬NSA£©³¤Ê±¼äÒÔÀ´¾Í¹Ø×¢´ó²¿·Ö²Ù×÷ϵͳÖÐÊÜÏ޵ݲȫÄÜÁ¦¡£±Ï¾¹£¬ËûÃǵŤ×÷Ö®Ò»¾ÍÊÇҪȷ±£ÃÀ¹ú¹ú·À²¿Ê¹ÓõļÆËã»úÔÚà ......

Redhat Linux oracle 10g em °´Å¥ÂÒÂë½â¾ö

ÍøÉÏÓкܶàµÄ×ÊÁÏ£¬²Î¿¼itput£¨http://space.itpub.net/471666/viewspace-215923£©µÄ¡£
OS : Redhat
DB : Oracle 10.2.0.4.0
1.ÐÞ¸Äjdk ÏÂÃæµÄ×ÖÌå¡£
[oracle@a ~]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@a ~]]$ mv font.properties font.properties_bak
[oracle@a ~]]$
[oracle@a ~]]$ cp font.properties.zh_CN.R ......

¶Áºó¸Ð2 linuxѧϰ

¹ûÈ»ÊǹýÁ˺þã¬Õâ´ÎÓÖ×¼±¸¿ªÊ¼Ñ§Ï°linuxÁË¡£ÏµÍ³µÄѧϰºÍÔÚÍøÉÏÕÒµãÖ»ÑÔÆ¬ÓïµÄÁ˽â¹ûÈ»ÊDz»Ò»ÑùµÄ¡£¿´ÍêÕâµãÕ½ڣ¬×Ô¼º¾ÍÔÙ×ö×ö×ܽá°É¡£
ÎÒ´ó¸ÅÁ˽âÏÂÀ´ÊÇÕâÑùµÄ¡£¶ÔÓÚlinuxµÄÎļþϵͳÀ´Ëµ£¬ÏÂÃæÓкܶà“Îļþ”£¬ÕâЩ“Îļþ”°üÀ¨ÁËÉ豸¡¢´ÅÅÌÇý¶¯Æ÷µÈµÈ¡£±ÈÈç"\"±íʾ¸ùĿ¼£¬¶ø\userÊÇÓÃÀ´×°Õû¸ö²Ù ......

½¨Á¢ARM+LinuxÔËÐл·¾³

http://blog.csdn.net/dinitial/archive/2009/02/22/3923447.aspx
ǰһ¸ö½×¶ÎÖ÷ÒªÊÇÔÚWindowsxpÏ£¬Í¨¹ýADS1.2¡¢H-JTAGºÍDNWÀ´¶Ô´úÂë½øÐб༭ºÍµ÷ÊÔ¡£ÏÖÔÚתµ½LinuxÏ£¬ÀûÓÃRedHat9.0+ÐéÄâ»ú×÷Ϊ¿ª·¢»·¾³£¬ÕâÀォÕâÁ½ÌìÀ´¶Ô»·¾³µÄÅäÖü°ÆäÓöµ½µÄÎÊÌâ×ܽáһϡ£
       ¿ª·¢°åΪGEC2410£¬ÔÚ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ