|
|
#include<stdio.h>
; ~* N8 u5 |! I$ O; _5 I9 A#include <string.h>
4 h9 E1 }" G' J#include<sysan.h>
( K* Z1 B& e4 U9 y: C& D#include<fcntl.h>) S5 I: b ]& ]/ T" O% Y7 i
#include<errno.h>
# {. ^2 W: |5 b2 ]- C9 U! B( yint main(void)8 r$ |! d9 ?) E
{
}( J$ J; p/ F int fd;# p5 H4 N, l; N0 l. A0 R. y
fd=open("dev/mem", 0);
2 x: S: V: k) P" w; B" ?3 @ printf("==(%d)==%s==",fd,strerror(errno));
4 @) J1 H% @ T3 u6 W& s) E p}
8 s: ~2 z2 N7 v- W& H在OMAPL138开发板上运行时总是打印; P" o2 i3 X& L
==(-1)==No such file or directory==- r6 ~ x8 s p' i& L0 }
就是说dev/mem 不存在的意思? 在dev确实存在mem呀.
f) Y" {8 Z4 H2 Z, p请问这是什么原因导致打开dev/mem失败呀?
. B# D+ c& V* y( J+ R9 i q3 ]# G) n) E; o l' ^$ m+ A l
' n3 h( w8 w9 X2 d0 n2 R9 H
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|