* cygcheck.cc (dump_sysinfo): Report the failing drive to prevent having to

guess.
This commit is contained in:
Christopher Faylor 2006-01-05 18:31:26 +00:00
parent 087df65261
commit 2ea1dced21
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-01-05 Christopher Faylor <cgf@timesys.com>
* cygcheck.cc (dump_sysinfo): Report the failing drive to prevent
having to guess.
2005-12-29 Christopher Faylor <cgf@timesys.com>
* strace.cc (nprocesses): Make static global.

View File

@ -1275,10 +1275,17 @@ dump_sysinfo ()
/* Report all errors, except if the Volume is ERROR_NOT_READY.
ERROR_NOT_READY is returned when removeable media drives are empty
(CD, floppy, etc.) */
if (!GetVolumeInformation
(drive, name, sizeof (name), &serno, &maxnamelen, &flags, fsname,
sizeof (fsname)) && GetLastError () != ERROR_NOT_READY)
display_error ("dump_sysinfo: GetVolumeInformation()");
if (!GetVolumeInformation (drive, name, sizeof (name), &serno,
&maxnamelen, &flags, fsname,
sizeof (fsname))
&& GetLastError () != ERROR_NOT_READY)
{
# define FMT "dump_sysinfo: GetVolumeInformation() for drive %c:"
char buf[sizeof (FMT)];
sprintf (buf, FMT, 'A' + i);
display_error (buf);
# undef FMT
}
int dtype = GetDriveType (drive);
char drive_type[4] = "unk";