|
#include<stdio.h> " h& a& d R3 |
#include <string.h>* A, n$ {. u b
#include<sysan.h>
* ^" d1 i/ R8 t#include<fcntl.h>0 I. }# k, \/ M5 ]
#include<errno.h>: B- g: a: V8 \
int main(void)
0 P7 h, t, w' Y& z{ " s. y) g0 ^* f6 U, Q8 A
int fd;1 A) @; i: t. l$ e( ~
fd=open("dev/mem", 0);
y/ e( R' \) B/ D- L1 F& x; c printf("==(%d)==%s==",fd,strerror(errno)); 2 r% K8 E" @9 n1 @. b0 N
}6 M9 F" z9 [/ B* b( ]" E
在OMAPL138开发板上运行时总是打印
. b) l4 o" n% S==(-1)==No such file or directory==
: q I1 M. m- O就是说dev/mem 不存在的意思? 在dev确实存在mem呀.
- N4 t3 {( y: ^& R+ ^请问这是什么原因导致打开dev/mem失败呀?6 N0 y' `* n# j* P
8 z B- x T: `: D; p+ y6 M
2 g; f# r4 F; b, c! [7 h B1 w# [, U |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|