]> sourceware.org Git - newlib-cygwin.git/commitdiff
* cygcheck.cc (dump_sysinfo): Report the failing drive to prevent having to
authorChristopher Faylor <me@cgf.cx>
Thu, 5 Jan 2006 18:31:26 +0000 (18:31 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 5 Jan 2006 18:31:26 +0000 (18:31 +0000)
guess.

winsup/utils/ChangeLog
winsup/utils/cygcheck.cc

index 417d5a7c7fb2f6c9d873169e6d713f73e226d9ef..3245d8ad4ecc466874872fae6af259bc2ff1a8aa 100644 (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.
index f943e0ee5ce5c2fb4b5390fb956ea14f6c26654e..c6e5e5ecacbe28d58554f9f5d28da110b5be988d 100644 (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";
This page took 0.032659 seconds and 5 git commands to generate.