View topic - QNX API to list all storage volumes connected to machine

QNX API to list all storage volumes connected to machine

anything that doesn't fit to other groups.

QNX API to list all storage volumes connected to machine

Postby alaipayuthe » Fri May 04, 2012 7:09 am

Hi all,
I need to write a C++ application with a GUI. I need to display all storage volumes connected to the QNX machine in the GUI. I have seen commands like df, fdisk etc. But they are all giving additional information like size, where it is mounted etc. I need to know if there is any QNX API so that I can use to retrieve only the list of connected storage volumes. I am using QNX 6.5.0.

Thanks,
Honey S
alaipayuthe
Active Member
 
Posts: 13
Joined: Fri Oct 16, 2009 7:01 am

Re: QNX API to list all storage volumes connected to machine

Postby maschoen » Fri May 04, 2012 7:32 am

A while ago I had to create a utility that did this sort of thing. It was a GUI program that viewed the current state of things and allowed enumerating, mounting and un-mounting. I think the strategy went something like this.

Search /dev as a directory. Identify block I/O devices. This involved either the stat() or fstat() routines and I think there was some extra information that had to be retrieved to find out if and where the devices were mounted. There were also complications like stepping over /dev/hd0 and looking at things like /dev/hd0t77. The information structures weren't all that well documented but with a little experimentation it all became clear.

If you ping me again, I might be able to find the utility and pass it on for reference.
maschoen
QNX Master
 
Posts: 2715
Joined: Wed Jun 25, 2003 5:18 pm

Re: QNX API to list all storage volumes connected to machine

Postby alaipayuthe » Fri May 04, 2012 12:17 pm

Hi maschoen,

Thank you for your reply. It will be very helpful for me if you pass the source code for me as reference as our project is so tight.

Thanks,
Honey S
alaipayuthe
Active Member
 
Posts: 13
Joined: Fri Oct 16, 2009 7:01 am

Re: QNX API to list all storage volumes connected to machine

Postby maschoen » Fri May 04, 2012 10:33 pm

I tried uploading it but I can't upload a .tgz file. How do I get it to you? email address?

You can email me at maschoen@pobox.com
maschoen
QNX Master
 
Posts: 2715
Joined: Wed Jun 25, 2003 5:18 pm

Re: QNX API to list all storage volumes connected to machine

Postby alaipayuthe » Mon May 07, 2012 5:57 am

Ok.
alaipayuthe
Active Member
 
Posts: 13
Joined: Fri Oct 16, 2009 7:01 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron