From: "A.Appleyard" To: DJGPP AT sun DOT soe DOT clarkson DOT edu Date: Fri, 2 Feb 1996 08:35:00 GMT Subject: info re drives : getmntent() struct mntent * getmntent(FILE *filep) { if (drive_number == -1) return NULL; if (filep != (FILE *)1) { errno = EBADF; /* fake errno for invalid handle */ return NULL; } ... /* Work around a possible bug in QDPMI: _truename() would sometimes crash the calling program when there is no disk in a (floppy) drive. To avoid this, we have to check if the drive is empty with a BIOS call. */ if (drive_number <= 2) { <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ... while (++count < 10 && (bios_status = biosdisk(2, drive_number - 1, 0, 0, 1, 1, buf)) == 6) biosdisk(0, drive_number - 1, 0, 0, 0, 0, NULL); /* If the loop ends with nonzero status, fail. */ if (bios_status != 0) continue; } ... This assumes that there are never > 2 floppy drives. There sometimes are. I heard of someone with 4 floppy drives A: B: C: D:, and his hard drive was E: