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

LinuxÏÂÉèÖö˿ÚȨÏÞµÄϵͳµ÷ÓÃÓÐÁ½¸ö£ºiopermºÍiopl

Linux
ÏÂÉèÖö˿ÚȨÏÞµÄϵͳµ÷ÓÃÓÐÁ½¸ö£º
ioperm
ºÍ
iopl
¡£
 
Ò»¡¢
ioperm
ºÍ
iopl
½éÉÜ¡£
1.ioperm
¹¦ÄÜÃèÊö£º
Ϊµ÷Óýø³ÌÉèÖÃ
I/O
¶Ë¿Ú·ÃÎÊȨÄÜ¡£
ioperm
µÄʹÓÃÐèÒª¾ßÓг¬¼¶Óû§µÄȨÏÞ£¬Ö»ÓеͶ˵Ä
[0-0x3ff] I/O
¶Ë¿Ú¿É±»ÉèÖã¬ÒªÏëÖ¸¶¨¸ü¶à¶Ë¿ÚµÄȨÄÜ£¬¿ÉʹÓÃ
iopl
º¯Êý¡£ÕâÒ»µ÷ÓÃÖ»¿ÉÓÃÓÚ
i386
ƽ̨¡£

Ó÷¨£º
#include <unistd.h> /* for libc5 */
#include <sys/io.h> /* for glibc */
int ioperm(unsigned long from, unsigned long num, int turn_on);
      
²ÎÊý£º
from
£ºÆðʼ¶Ë¿ÚµØÖ·¡£
num
£ºÐèÒªÐÞ¸ÄȨÄܵĶ˿ÚÊý¡£
turn_on
£º¶Ë¿ÚµÄÐÂȨÄÜλ¡£
1
Ϊ¿ªÆô£¬
0
Ϊ¹Ø±Õ¡£
·µ»Ø˵Ã÷£º

³É¹¦Ö´ÐÐʱ£¬·µ»Ø
0
¡£Ê§°Ü·µ»Ø
-1
£¬
errno
±»ÉèΪÒÔϵÄij¸öÖµ

EINVAL
£º²ÎÊýÎÞЧ
EIO
£ºÕâÒ»µ÷Óò»±»Ö§³Ö
EPERM
£ºµ÷Óýø³ÌȨÄܲ»×ã¡£

2. iopl
¹¦ÄÜÃèÊö£º¸Ãµ÷ÓÃÓÃÓÚÐ޸ĵ±Ç°½ø³ÌµÄ²Ù×÷¶Ë¿ÚµÄȨÏÞ¡£¿ÉÒÔÓÃÓÚËùÓÐ
65536
¸ö¶Ë¿ÚµÄȨÏÞ¡£Òò´Ë£¬
ioperm
Ï൱Óڸõ÷ÓõÄ×Ó¼¯¡£ºÍ
ioperm
Ò»Ñù£¬ÕâÒ»µ÷ÓýöÊÊÓÃÓÚ
i386
ƽ̨¡£

Ó÷¨£º
#include <sys/io.h>
  
int iopl(int level);
²ÎÊý£º
level
£º

¶Ë¿ÚµÄȨÏÞ¼¶±ð
¡£Îª
3
ʱ¿ÉÒÔ¶Áд¶Ë¿Ú¡£Ä¬ÈÏȨÄܼ¶±ðΪ
0
£¬Óû§¿Õ¼ä²»¿É¶Áд¡£
·µ»Ø˵Ã÷£º³É¹¦Ö´ÐÐʱ£¬·µ»Ø
0
¡£Ê§°Ü·µ»Ø
-1
£¬
errno
±»ÉèΪÒÔϵÄij¸öÖµ
EINVAL
£º
level
Öµ´óÓÚ
3
ENOSYS
£ºÎ´ÊµÏָõ÷ÓÃ
EPERM
£ºµ÷Óýø³ÌȨÄܲ»×ã¡£

¶þ¡¢³ÌÐòʾÀý
1. ioperm.c
²Ù×÷µÍÓÚ
0x3FF
µÄ¶Ë¿Ú
¸Ã³ÌÐòÊ×ÏÈÉèÖÃ
0x3FF
¶Ë¿ÚµÄ¶ÁдȨÏÞ£¬È»ºó¶Á³öÔ­ÏȵÄÖµ£¬È»ºó½«Ô­ÖµµÄ
LSB
·­×ª²¢Ð´»Ø¶Ë¿Ú£¬²¢Ôڴ˶ÁÈ¡¶Ë¿ÚÖµ¡£
/*Godbach. Dec 18, 2008
Description:This function is used to test ioperm()*/
#include <stdio.h>
#include <unistd.h>
#include <sys/io.h>

#define PORT_ADDR 0x3FF

int main(void)
{
     
int ret;
     
char port_val;

     
/*set r/w permission of port_addr on, only one port*/
     
ret = ioperm(PORT_ADDR, 1, 1);
     
if(ret < 0){


Ïà¹ØÎĵµ£º

Linux¶¨Ê±Æ÷ Ïê½â[ת]


[ת]Linux¶¨Ê±Æ÷

ºËÖ÷ÒªÐèÒªÁ½ÖÖÀàÐ͵Äʱ¼ä£º


1.

ÔÚÄÚºËÔËÐÐÆÚ¼ä³ÖÐø¼Ç¼µ±Ç°µÄʱ¼äÓëÈÕÆÚ£¬ÒÔ±ãÄں˶ÔijЩ¶ÔÏóºÍʼþ×÷ʱ¼ä±ê¼Ç£¨

timestamp

£¬Ò²³ÆΪ



ʱ¼ä´Á



£©£¬»ò¹©ÓÃ



»§Í¨¹ýʱ¼ä

syscall ......

ÔÚlinuxÏÂʹÓÃgtkµÄgdk

aishen944-163.com
תÌùÇë×¢Ã÷³ö´¦£¬Ð»Ð»£¡£¡
Æäʵ͸Ã÷ÌùͼµÄÔ­Àí¾ÍÊǽøÐÐxorÔËË㣬
»ù±¾¹«Ê½£ºA  xor A = 0    A xor 0 = A   A xor A xor B  = B
¼ÙÈçÏÖÔÚÓÐÁ½ÕÅͼƬ£¬Ò»ÕÅÊÇÎÒÃÇÒª¶ÔÆä½øÐÐÌùͼµÄͼƬA£¬ ÁíÍâÒ»ÕÅÊÇÒª±»ÌùͼµÄͼƬB
1£¬ ¸´ÖÆͼƬBµÄÒ»·Ý¿½±´ÎªC
2£¬ ½«CÖÐÖ¸¶¨ ......

fedora/linux yumÔ´ÏêϸÉèÖÃ(Ç¿ÁÒÍƼö)

¾­¹ý¼è¿àµÄ·Ü¶·£¬ÖÕÓڸ㶨ÁËfedoraϵͳ´Ó°²×°µ½3DÌØЧ(±¾ÈË°²×°µÄÊÇfedora
11)£¬ÎªÁË·½±ãºóÀ´µÄlinuxer£¬ÌØÁôϱ¾È˵ÄÈ«¹ý³ÌÒÔ¹©²Î¿¼¡£ÒÔϲ½ÖèÓеÄÀ´×ÔÓÚgoogleËÑË÷£¬Óв¿·ÖÀ´×ÔÓÚ¼ÎÓÓÖÐÎIJ©¿Í
£¨http://www.my-guides.net/en/content/view/164/26/£©£¬²¢¸Ðл¸÷·½Ç°±²µÄ±Ê¼£¡£
1.Ìí¼Órpm fusionÔ´
rpm -ivh
http://do ......

linuxÉèÖû·¾³±äÁ¿

1¡¢ÒýÑÔ
    ÔÚlinuxϵͳÏ£¬Èç¹ûÄãÏÂÔز¢°²×°ÁËÓ¦ÓóÌÐò£¬ºÜÓпÉÄÜÔÚ¼üÈëËüµÄÃû³Æʱ³öÏÖ“command not found”µÄÌáʾÄÚÈÝ¡£Èç¹ûÿ´Î¶¼µ½°²×°Ä¿±êÎļþ¼ÐÄÚ£¬ÕÒµ½¿ÉÖ´ÐÐÎļþÀ´½øÐвÙ×÷¾ÍÌ«·±ËöÁË¡£ÕâÉæ¼°µ½»·¾³±äÁ¿PATHµÄÉèÖÃÎÊÌ⣬¶øPATHµÄÉèÖÃÒ²ÊÇÔÚlinux϶¨ÖÆ»·¾³±äÁ¿µÄÒ»¸ö×é³É²¿·Ö¡£±¾ÎÄ»ùÓ ......

linux ÖÐÎÄÏÔʾÂÒÂë½â¾ö°ì·¨


linux ÖÐÎÄÏÔʾÂÒÂë½â¾ö°ì·¨
vi /etc/sysconfig/i18n
½«ÄÚÈݸÄΪ
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
ÕâÑùÖÐÎÄÔÚSSH,telnetÖն˾ͿÉÒÔÕý³£ÏÔʾ
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ