Re: [PATCH] 2.5.14 IDE 56

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 8 May 2002 20:31:11 +0100 (BST)


> int i, type, major=0, minor=0;
> for(i=0; i<26; i++) {
> snprintf(device_string, sizeof(device_string), "/dev/hd%c", 'a'+i);
> if ((fd=open(device_string, O_RDONLY | O_NONBLOCK)) < 0) {
> continue;
> }

If it opened is it there. Suppose its an IDE floppy and no media is
present. Maybe its hiding in ide-scsi instead. It ends up being detective
work. The /device set up makes it explicit and clean
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/