I have some custom stuff I'm porting from Freebsd 9.x using mmap. I get a 
pointer from the kernel via an ioctl and I map it into a shared buffer.
char *kptr;   // mem ptr from kernel
fd=open("/dev/kmem",O_RDWR);memp=mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,(off_t)
 ptr);

This worked perfectly in 9; memp I had a shared block of memory between the 
kernel and user space.
In 11.3 this returns an errno 22, which is pretty murky. I did notice that 
off_t doesnt yield an actual offset; I've tried putting in the correct value 
manuallybut it just fails and fails.I've tried read only also. 
Please Help!
Laurie
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to