diff options
author | Jacob Moody <moody@posixcafe.org> | 2022-09-11 20:50:46 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2022-09-11 20:50:46 +0000 |
commit | e2d6d402f1a4a063b3549cb2e988a6e978858579 (patch) | |
tree | 5c144395cb0c814baca6be8bbd35906904e62509 /sys/src/cmd/rio | |
parent | ed06d703439b70bdc4c5ff96d0d3749ccb8566c9 (diff) |
rio: return 'global' size for none /dev/wctl read (thanks umbraticus)
Before we were just erroring, this provides something useful giving
the total size of the rio to the riostart script.
Diffstat (limited to 'sys/src/cmd/rio')
-rw-r--r-- | sys/src/cmd/rio/xfid.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/src/cmd/rio/xfid.c b/sys/src/cmd/rio/xfid.c index a22101ed4..e33768857 100644 --- a/sys/src/cmd/rio/xfid.c +++ b/sys/src/cmd/rio/xfid.c @@ -657,8 +657,14 @@ xfidread(Xfid *x) switch(qid){ case Qwctl: if(w == nil){ - filsysrespond(x->fs, x, &fc, "no window"); - return; + if(off >= 6*12){ + filsysrespond(x->fs, x, &fc, "no window"); + return; + } + n = sprint(buf, "%11d %11d %11d %11d nowindow nowindow ", + screen->r.min.x, screen->r.min.y, screen->r.max.x, screen->r.max.y); + t = estrdup(buf); + goto Text; } if(cnt < 4*12){ filsysrespond(x->fs, x, &fc, Etooshort); |