From e4245c99f619cc244d828722e1a134b319ce5d3a Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 1 Jan 2003 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2003-01-01 --- port/devmnt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/port/devmnt.c b/port/devmnt.c index ed9c041a0370b280ad90c92fcdc387b8d260ebba..b1ff46708488b2fcb4b7b1c3d1e1ceb72338ee5a 100644 --- a/port/devmnt.c +++ b/port/devmnt.c @@ -482,6 +482,19 @@ mntstat(Chan *c, uchar *dp, int n) error("returned stat buffer count too large"); if(r->reply.nstat > n){ + /* + * 12/31/2002 RSC + * + * This should be nstat-2, which is the first two + * bytes of the stat buffer. But dirstat and dirfstat + * depended on getting the full nstat (they didn't + * add BIT16SZ themselves). I fixed dirstat and dirfstat + * but am leaving this unchanged for now. After a + * few months, once enough of the relevant binaries + * have been recompiled for other reasons, we can + * change this to nstat-2. Devstat gets this right + * (via convD2M). + */ /* doesn't fit; just patch the count and return */ PBIT16((uchar*)dp, r->reply.nstat); n = BIT16SZ;