IDE-Bus rescan, like bootup...

Fat Poison (poison@cat.hu)
Wed, 2 Jun 1999 03:20:17 +0200 (CEST)


Hello all!

I've bought a special IDE-rack which can safetly remove, and insert IDE
drives... I've got a software for W*nd*ws to rescan the IDE bus, and gain
access to the freshly inserted HD. The Same I want to do under Linux... As
I looked into the kernelsource, this may done like this:

int main()
{
int x[]={0x170,0x376,15};
int fd=open("/dev/hdc", O_RDONLY);
int i = ioctl(fd,HDIO_SCAN_HWIF, &x);
close(fd);
}

But anytime I run this ioctl it's return with input/output error, while
/dev/hdc is _NOT_ in use by any case (not mounted, not accessed, etc.)...

Anyone knows what the problem is?

I'm using kernel 2.2.9 with generic IDE support, of coz' on an Intel
platform... (Intel P233MMX)

- Please CC the answers, because i'm not subscribed to the list -

thanks

--
|~~~~||~~\. mail from:   EMAIL:   poison@cat.hu     .
|  ~|'| ~ |   ..-,   ,   WEB: http://poison.cat.hu  :
| |~' | |~'.~.| `..~.:`. IRC:   #linux.hu, #linux   .
`~    `~    ~ ` ~  ~ ` ' ```````````````'''''''''''''

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/