a question about ioctrl



I have a linux question , I wonder whether I can find answer here.

I try to get the harddisk information by calling ioctl()

I did like this:

    fd=open("/dev/hda7",O_RDWR);
    ioctl(fd,HDIO_GET_IDENTITY,diskinfo);

It can successfully open the hd, which means I get fd, but it turns
wrong when calling ioctl(..).
I print out the error message, it said :"Invalid Arguments".

I don't know where is wrong?

If someone knows, please tell me ASAP

Thanks





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]