From f12f0839e6ef9d83ed6b515dcae8efe72087c3c0 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 4 Sep 2001 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2001-09-04 --- port/dev.c | 2 ++ port/devcons.c | 3 ++- port/portdat.h | 1 + port/qio.c | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/port/dev.c b/port/dev.c index ada172e9ab5603b36585d7f2b5a68870f7e1abdc..ce649753bc6026f83e13a0bcf1679e2380a29323 100644 --- a/port/dev.c +++ b/port/dev.c @@ -34,6 +34,8 @@ void devdir(Chan *c, Qid qid, char *n, vlong length, char *user, long perm, Dir *db) { db->name = n; + if(c->flag&CMSG) + qid.type |= QTMOUNT; db->qid = qid; db->type = devtab[c->type]->dc; db->dev = c->dev; diff --git a/port/devcons.c b/port/devcons.c index 949ce4808050f012b250c3b5283db3438cc22ab2..85a09066e9421b14419b814347680eeacb8b56ce 100644 --- a/port/devcons.c +++ b/port/devcons.c @@ -845,7 +845,8 @@ consread(Chan *c, void *buf, long n, vlong off) return n; case Qosversion: - n = readstr((ulong)offset, buf, n, "2000"); + snprint(tmp, sizeof tmp, "2000 %d", qiomaxatomic); + n = readstr((ulong)offset, buf, n, tmp); return n; default: diff --git a/port/portdat.h b/port/portdat.h index 46ddd657239e39bcb80979739f3f8a48e38a9410..ecb9fb81594135e7af803a39c412016d611e29cc 100644 --- a/port/portdat.h +++ b/port/portdat.h @@ -676,6 +676,7 @@ extern int nsyscall; extern char *sysname; extern Pthash syspt; extern Talarm talarm; +extern uint qiomaxatomic; enum { diff --git a/port/qio.c b/port/qio.c index bc4d2fec477a2f6ce37107bbe6563547932988e9..c20fd3ecdf99c95538cf76b7e0a78b27cb50fb1a 100644 --- a/port/qio.c +++ b/port/qio.c @@ -60,6 +60,8 @@ enum Maxatomic = 32*1024, }; +uint qiomaxatomic = Maxatomic; + void ixsummary(void) {