X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdevices%2Fdisk.c;h=206f69c91feceed3f6a5eef2776f1c8e34a8521b;hb=a1f21ee888bd397c0d256ebd1db4caaf107f40ab;hp=baf120864399f11a8c33ae27f37a41992b413cab;hpb=34a1a2cf11500505e74ae5796e88de0d8de00958;p=pintos-anon diff --git a/src/devices/disk.c b/src/devices/disk.c index baf1208..206f69c 100644 --- a/src/devices/disk.c +++ b/src/devices/disk.c @@ -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: