grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] mkdevicemap for Cygwin


From: Christian Franke
Subject: Re: [PATCH] mkdevicemap for Cygwin
Date: Sun, 18 Nov 2007 19:40:15 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4

Robert Millan wrote:
On Tue, Nov 13, 2007 at 09:42:26PM +0100, Christian Franke wrote:
+#elif defined(__CYGWIN__)
+  /* Cygwin */
+  sprintf (name, "/dev/fd%d", unit);

Cygwin has /dev now?  :-)


At least since 2003.


+#ifndef __CYGWIN__
 static void
 get_ide_disk_name (char *name, int unit)
 {
@@ -213,6 +217,7 @@ get_ide_disk_name (char *name, int unit)
   *name = 0;
 #endif
 }
+#endif /* __CYGWIN__ */

[...]

+#ifndef __CYGWIN__ /* IDE disks. */
   for (i = 0; i < 8; i++)
     {
@@ -431,6 +440,7 @@ make_device_map (const char *device_map,
          num_hd++;
        }
     }
+#endif /* __CYGWIN__ */

Is the generic case (`*name = 0', then print that) good enough?



No, it did not work because check_device() returned 1 ("exists") on (*name == 0). This results in 8 bogus "(hd N)\t\n" lines and wrong N for the real devices.

Yes, it would work now, because the patch also fixes this bug :-)

Christian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]