On Wed, Jul 25, 2012 at 10:51:56PM +0200, Otto Moerbeek wrote:
> Userland prorams do not share memory or symbols with the kernel at all
> that is a fundamental thing in Unix. Your code just references a bunch
> of uninitialized vars. 
> 
> Chekc opendev(3) (source in src/lib/libutil/opendev.c) which is a
> userland function to do the translation you want. Note it interfaces
> with the kernel via ioctl(2), the actual work is done by the diskmap
> device driver that calls disk_map(), all in kernel mode.

Funny, I first looked at opendev(3) and the DIOCMAP ioctl before I went
on to disk_map(). Obviously I missed something. Will have a look at
opendev(3) again. 

Thanks a lot for the pointer.

Frank.

-- 
Frank Brodbeck <f...@guug.de>

Reply via email to