diff options
author | Christopher Faylor <me@cgf.cx> | 2006-01-05 18:31:26 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-01-05 18:31:26 +0000 |
commit | 2ea1dced21310b3d419a5e2adfe3d5afdccd489b (patch) | |
tree | 4c1a3057b91b321e4dd5757d40e4b6c54f8bb240 | |
parent | 087df652618a467aacfa354a8c9acbdf55d7f33d (diff) | |
download | newlib-2ea1dced21310b3d419a5e2adfe3d5afdccd489b.zip newlib-2ea1dced21310b3d419a5e2adfe3d5afdccd489b.tar.gz newlib-2ea1dced21310b3d419a5e2adfe3d5afdccd489b.tar.bz2 |
* cygcheck.cc (dump_sysinfo): Report the failing drive to prevent having to
guess.
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/cygcheck.cc | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 417d5a7..3245d8a 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -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. diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index f943e0e..c6e5e5e 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -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"; |