From 1a81e38b17144624415d252a521fd5a06079d681 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 11 Jan 2011 13:01:13 -0500 Subject: make new code like old code Variable declarations at top of function, separate from initialization. Use == 0 instead of ! for checking pointers. Consistent spacing around {, *, casts. Declare 0-parameter functions as (void) not (). Integer valued functions return -1 on failure, 0 on success. --- ide.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ide.c') diff --git a/ide.c b/ide.c index 7b12aa0..f4bd210 100644 --- a/ide.c +++ b/ide.c @@ -131,7 +131,7 @@ iderw(struct buf *b) if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) panic("iderw: nothing to do"); if(b->dev != 0 && !havedisk1) - panic("idrw: ide disk 1 not present"); + panic("iderw: ide disk 1 not present"); acquire(&idelock); @@ -147,7 +147,7 @@ iderw(struct buf *b) // Wait for request to finish. // Assuming will not sleep too long: ignore proc->killed. - while((b->flags & (B_VALID|B_DIRTY)) != B_VALID) { + while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ sleep(b, &idelock); } -- cgit v1.2.3 From cf4b1ad90bcaeeb0c8458098c87948f61d408f94 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 19 Feb 2011 21:17:55 -0500 Subject: xv6: formatting, cleanup, rev5 (take 2) --- ide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ide.c') diff --git a/ide.c b/ide.c index f4bd210..53293a7 100644 --- a/ide.c +++ b/ide.c @@ -96,7 +96,7 @@ ideintr(void) acquire(&idelock); if((b = idequeue) == 0){ release(&idelock); - cprintf("Spurious IDE interrupt.\n"); + // cprintf("spurious IDE interrupt\n"); return; } idequeue = b->qnext; -- cgit v1.2.3