On Mon, Sep 29, 2003 at 11:45:56AM +0300, Erez Doron wrote:
hi
i've written a device driver which maps a card's memory to a device.
i can read/write/seek the device
i can't seem to mmap it though
What does mmap return? what does your mmap implementation look like?
more details please, I flunked mind reading.
the relevant code is:
if (-1==(mmap_fd=open(devname,O_RDWR))) {perror(devname);exit(1);};
printf("fd=%d\r\n",mmap_fd);
printf("mem-mapping ...\r\n");
if (-1==(mmapped=(unsigned int *)mmap((char *)0,65536,PROT_READ|PROT_WRITE,MAP_FIXED,mmap_fd,0))) {perror("mmap");exit(1);};
output:
fd=3 mem-mapping ... mmap: No such device
cheers, erez.
================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]