PDA

View Full Version : how i can open hard disk???




naveen
Feb 23, 2005, 01:19 AM
Hi all
* * * I want to get hard disk size through using system functions in the following three files:- sys/fcntl.h,sys/ioctl.h,sys/disklabel.h

first of all i am using the fuction of fcntl.h to open the hard disk that is
int ****open __P((const char *, int, ...));
int j=open __P("/dev/disk0",O_RDONLY); * (in coding i am using this to call the above function)

But above function is not working. But i don't know where is my error.



But i have problem in using the int ****open __P((const char *, int, ...));
i have the following errors
*macro "__P" passed 2 arguments, but takes just 1
In file included from .ui/form3.cpp:21:
form3.ui.h: In member function `virtual void Form3::diskSize()':
form3.ui.h:55: error: `open' undeclared (first use this function)
form3.ui.h:55: error: (Each undeclared identifier is reported only once for
* *each function it appears in.)

How i can solve this problem?
Thanks and Regards