Peter,

There is a library in OpenSolaris, libdiskmgt, that has interfaces you can use to enumerate disks, and get information about them.

usr/src/lib/libdiskmgt/common.

Sample code is in many places, for example 'format' uses this library to enumerate disks.

sarah
****

On 07/22/10 01:38 PM, Peter Taps 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.

Thank you in advance for your help.

Regards,
Peter
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to