Re: disk_map in subr_disk.c

2012-07-27 Thread Tobias Ulmer
On Wed, Jul 25, 2012 at 11:37:32PM +0200, Frank Brodbeck wrote: 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.

Re: disk_map in subr_disk.c

2012-07-26 Thread Paul de Weerd
On Wed, Jul 25, 2012 at 09:34:02PM +0200, Frank Brodbeck wrote: | Hi, | | currently I am trying (just out of curiosity) to find a way to resolve a | duid to a device name. For that matter I believe that looking at | disk_map() in subr_disk.c is the right place. Or try sysctl(3). Here's some

disk_map in subr_disk.c

2012-07-25 Thread Frank Brodbeck
Hi, currently I am trying (just out of curiosity) to find a way to resolve a duid to a device name. For that matter I believe that looking at disk_map() in subr_disk.c is the right place. As I am a complete C beginner I have a hard time to understand a particular block of code so I decided

Re: disk_map in subr_disk.c

2012-07-25 Thread Otto Moerbeek
On Wed, Jul 25, 2012 at 09:34:02PM +0200, Frank Brodbeck wrote: Hi, currently I am trying (just out of curiosity) to find a way to resolve a duid to a device name. For that matter I believe that looking at disk_map() in subr_disk.c is the right place. As I am a complete C beginner I have

Re: disk_map in subr_disk.c

2012-07-25 Thread Frank Brodbeck
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