From 796c41092aeb76bbbb151b56865b0355080d97c1 Mon Sep 17 00:00:00 2001 From: mischief Date: Mon, 6 Aug 2018 08:50:40 -0700 Subject: devaoe: fix unit numbering for Qdevlinkdir a side effect of 3c77cd3ae664 changed the unit ordering to start at one, so fix the condition accordingly. --- sys/src/9/port/devaoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/9/port/devaoe.c b/sys/src/9/port/devaoe.c index 0ef609bd1..ce8f51ec7 100644 --- a/sys/src/9/port/devaoe.c +++ b/sys/src/9/port/devaoe.c @@ -949,7 +949,7 @@ aoegen(Chan *c, char *, Dirtab *, int, int s, Dir *dp) return unitgen(c, TYPE(c->qid), dp); case Qdevlinkdir: i = UNIT(c->qid); - if(i >= Maxunits || i >= units.ref) + if(i > Maxunits || i > units.ref) return -1; d = unit2dev(i); if(s == DEVDOTDOT){ -- cgit v1.2.3