|
#include<stdio.h>
. D4 A5 W) l; s; k2 }#include <string.h>2 B0 \. ~1 C/ O/ m; c
#include<sysan.h>: c2 _: i- r- I1 R. S
#include<fcntl.h>
- X% x0 K" ]' O" W7 a5 c! b#include<errno.h>) b+ K0 N0 g$ f% y$ `
int main(void)8 z4 ~- \0 V. A* |% y8 V
{ / a4 o2 B5 T* M' I' B3 \1 Z
int fd;* o. I3 n ~$ N' ?* y- d; A
fd=open("dev/mem", 0); # w! u/ ?4 F" i7 Q; q9 F: |
printf("==(%d)==%s==",fd,strerror(errno)); * _% r: ^8 `- l& ~
}6 b- n% l& P" B: B& Z
在OMAPL138开发板上运行时总是打印
: j& L) a, D0 T& v==(-1)==No such file or directory==
& i6 K, ^1 S7 M9 `5 i: A就是说dev/mem 不存在的意思? 在dev确实存在mem呀.4 c. A, u- I1 d0 s% g
请问这是什么原因导致打开dev/mem失败呀?7 e* ~* G! N2 r2 { ?, d
+ }% g4 q4 `% h# h. o h9 v8 X* n( j2 @( e- Y) M
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|