From 5c12cf936b9c31fc853e71dbeb6723a290cf139b Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 30 Dec 1997 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1997-12-30 --- pc/devata.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pc/devata.c b/pc/devata.c index ccd4976ca8598c58df1905ff22ce89caa260dc2e..3b463c91d76753d1fa33b95a2cac04201a24411a 100644 --- a/pc/devata.c +++ b/pc/devata.c @@ -11,8 +11,8 @@ #include "../port/error.h" -#define DPRINT if(0)print -#define XPRINT if(0)print +#define DPRINT if(1)print +#define XPRINT if(1)print #define ILOCK(x) #define IUNLOCK(x) @@ -1818,6 +1818,11 @@ retry: cp->count, cp->status, cp->error); error(Eio); } +{ int i; + for(i = 0; i < 18; i++) + print("%2.2uX ", buf[i]); + print("\n"); +} cp->len = 8; cp->count = 0; @@ -1831,7 +1836,10 @@ retry: error(Eio); } dp->lbasecs = (cp->buf[0]<<24)|(cp->buf[1]<<16)|(cp->buf[2]<<8)|cp->buf[3]; + dp->bytes = (cp->buf[4]<<24)|(cp->buf[5]<<16)|(cp->buf[6]<<8)|cp->buf[7]; dp->cap = dp->lbasecs*dp->bytes; + DPRINT("%s: atapipart secs %ud, bytes %ud, cap %ud\n", + dp->vol, dp->lbasecs, dp->bytes, dp->cap); cp->dp = 0; free(cp->buf); poperror();