lkml.org 
[lkml]   [1999]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: IDE-Bus rescan, like bootup...
Date
> 	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 think, you should use it on a device, which really exist in the system
at the moment. If yoy have /dev/hda - use it.
I use a simillar program:

main() {
int par[3] = {0x170, 0x376, 15};
int fd = open("/dev/hda",0);
ioctl(fd, HDIO_SCAN_HWIF, (long)par);
}
It works, however, after use it system sometimes became unstable ...

Andrzej
--
=======================================================================
Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Technical University of Gdansk

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.058 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site