From 5273ecd4b5be9b45f86238a026940af8a0ad0a13 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sat, 10 Apr 1993 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1993-04-10 --- boot/local.c | 2 ++ pc/devfloppy.c | 1 + port/stfcall.c | 13 ++++++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/boot/local.c b/boot/local.c index 6156f707e401a2d64ceb17bfadbe78deb49bb94d..54ede9d73ae21a15a8e6dab863a8cb43520000e5 100644 --- a/boot/local.c +++ b/boot/local.c @@ -24,6 +24,8 @@ configlocal(Method *mp) } if(*sys == '/' || *sys == '#') disk = sys; + if(disk) + setenv("bootdisk", disk); USED(mp); } diff --git a/pc/devfloppy.c b/pc/devfloppy.c index de0a03208ae37e0ee5210f7428f3e48d2b4535e6..0833c80f2c61af57d3775683ac6081931e085296 100644 --- a/pc/devfloppy.c +++ b/pc/devfloppy.c @@ -110,6 +110,7 @@ Type floppytype[] = { "5¼HD", T1200kb, 512, 15, 2, 1, 80, 0x2A, 0x50, 0, }, { "5¼DD", T1200kb, 512, 9, 2, 2, 40, 0x2A, 0x50, 1, }, { "5¼DD", T360kb, 512, 9, 2, 1, 40, 0x2A, 0x50, 2, }, + { "ATT3B1", T360kb, 512, 8, 2, 1, 48, 0x2A, 0x50, 2, }, }; #define NTYPES (sizeof(floppytype)/sizeof(Type)) diff --git a/port/stfcall.c b/port/stfcall.c index aa8f67605e235ab3b8a03773eb9febedd88de965..20bdc439502e8ef6b3df40cc9ebc4424032a9d3f 100644 --- a/port/stfcall.c +++ b/port/stfcall.c @@ -158,9 +158,16 @@ fcalliput(Queue *q, Block *bp) if(q->len < len) return; - - pullup(q->first, len); - bp = q->first; + + /* + * the lock here is wrong. it should be a qlock since + * the pullup may block. not worth fixing. + */ + lock(q); + bp = q->first = pullup(q->first, len); + if(bp == 0) + q->len = 0; + unlock(q); need = len+bp->rptr[off]+(bp->rptr[off+1]<<8); if(q->len < need) return;