[FREELDR]
[reactos.git] / reactos / boot / freeldr / freeldr / arch / i386 / i386disk.c
index 1ecc74a..beeb15c 100644 (file)
@@ -12,9 +12,9 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #include <freeldr.h>
@@ -135,6 +135,9 @@ BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT B
 
        DPRINTM(DPRINT_DISK, "DiskGetExtendedDriveParameters()\n");
 
+       if (!DiskInt13ExtensionsSupported(DriveNumber))
+            return FALSE;
+
        // Initialize transfer buffer
        *Ptr = BufferSize;
 
@@ -163,6 +166,7 @@ BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT B
 
        memcpy(Buffer, Ptr, BufferSize);
 
+#if DBG
     DPRINTM(DPRINT_DISK, "size of buffer:                          %x\n", Ptr[0]);
     DPRINTM(DPRINT_DISK, "information flags:                       %x\n", Ptr[1]);
     DPRINTM(DPRINT_DISK, "number of physical cylinders on drive:   %u\n", *(PULONG)&Ptr[2]);
@@ -192,6 +196,7 @@ BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT B
     {
         DPRINTM(DPRINT_DISK, "signature:                             %x\n", Ptr[15]);
     }
+#endif
 
        return TRUE;
 }