Should iterate 10 times not 5.
[pintos-anon] / src / devices / disk.c
index baf120864399f11a8c33ae27f37a41992b413cab..206f69c91feceed3f6a5eef2776f1c8e34a8521b 100644 (file)
@@ -8,6 +8,9 @@
 #include "threads/interrupt.h"
 #include "threads/synch.h"
 
+/* The code in this file is an interface to an ATA (IDE)
+   controller.  It attempts to comply to [ATA-3]. */
+
 /* ATA command block port addresses. */
 #define reg_data(CHANNEL) ((CHANNEL)->reg_base + 0)     /* Data. */
 #define reg_error(CHANNEL) ((CHANNEL)->reg_base + 1)    /* Error. */
@@ -106,7 +109,7 @@ disk_init (void)
       int dev_no;
 
       /* Initialize channel. */
-      snprintf (c->name, sizeof c->name, "hd%zd", chan_no);
+      snprintf (c->name, sizeof c->name, "hd%zu", chan_no);
       switch (chan_no) 
         {
         case 0: