Add DEBUG() macro for debugging that can be turned on and off with a
[pintos-anon] / src / devices / disk.c
index 6206e78cedb9aec9df14146cae25704ee7f5e2d3..f63669d9afe5a62a2380b4fc287cf705e2f3e026 100644 (file)
@@ -458,7 +458,7 @@ disk_read (struct disk *d, disk_sector_no sec_no, void *buffer)
   sema_down (&d->channel->completion_wait);
   wait_while_busy (d);
   if (!input_sector (d->channel, buffer))
-    panic ("%s: disk read failed, sector=%"PRDSNu, d->name, sec_no);
+    PANIC ("%s: disk read failed, sector=%"PRDSNu, d->name, sec_no);
   lock_release (&d->channel->lock);
 }
 
@@ -473,7 +473,7 @@ disk_write (struct disk *d, disk_sector_no sec_no, const void *buffer)
   issue_command (d, CMD_WRITE_SECTOR_RETRY);
   wait_while_busy (d);
   if (!output_sector (d->channel, buffer))
-    panic ("%s: disk write failed, sector=%"PRDSNu, d->name, sec_no);
+    PANIC ("%s: disk write failed, sector=%"PRDSNu, d->name, sec_no);
   sema_down (&d->channel->completion_wait);
   lock_release (&d->channel->lock);
 }