Skip navigation.
Home
The QNX Community Portal

View topic - How can I get hard disk info and cpu info on QNX6.5

How can I get hard disk info and cpu info on QNX6.5

anything that doesn't fit to other groups.

How can I get hard disk info and cpu info on QNX6.5

Postby xuehuazhou » Fri Oct 31, 2014 6:30 am

I use QNX 6.5 X86,I want get the Harddisk( sata II or sata III) info such as hard disk id ,volume and cpu info such as cpu numbers,frequency and so on. But I cann't find the Api function to get them,who can give me some suggests? thank you.
xuehuazhou
New Member
 
Posts: 2
Joined: Thu Nov 19, 2009 9:54 am

Re: How can I get hard disk info and cpu info on QNX6.5

Postby Tim » Fri Oct 31, 2014 1:57 pm

This might give you some of what you want

http://www.qnx.com/developers/docs/6.3. ... nfstr.html

Not sure about disk id's. But I did see this post that you can copy the example and try and see if it's what you want (you have 6.5 so it should work there).

http://community.qnx.com/sf/go/projects ... _pagenum=4

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Re: How can I get hard disk info and cpu info on QNX6.5

Postby lullaby » Tue Dec 23, 2014 6:34 am

Hi,

Sorry for the late reply.
You can use the following code snippet.
Use open to open the device like:-

fd = open("/dev/hd0", O_RDONLY);

and then use stat(fd, ...).
Inside the stat structure, you may find the information you need about hard disk.

Thanks,
Lullaby
lullaby
Active Member
 
Posts: 82
Joined: Fri Jun 15, 2012 6:19 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 2 guests