On Thu, Jul 22, 2010 at 4:38 PM, Peter Taps <ptr...@yahoo.com> wrote: > Hello, > > I am working on an application that requires me to enumerate disks and > present their information to the user. > > Disks can be enumerated using "format" command. However, I am looking for a > programmatic way to do it. I would like to avoid running "format" process and > parsing the returned output. > > I would appreciate it if you could point me in the right direction for sample > 'C' language code. > > Our application is being built in Java. Any pointer to JNA or JNI samples > would be much appreciated.
Verify the do_search() function in startup.c [1]. Alternatively, you can get some information about sd* devices from kstat [2] [1] - http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/format/startup.c [2] - http://hub.opensolaris.org/bin/view/Project+jkstat/ -- Giovanni Tirloni gtirl...@sysdroid.com _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code