ref: 003f169c3ee40cf7b77219cef10af9029ce23b2d
parent: 7ab638a68075173cb976eb56ce28d79ad4f38fd2
author: 9ferno <[email protected]>
date: Mon Jan 10 14:18:01 EST 2022
added prints on errors
--- a/emu/port/sysfile.c
+++ b/emu/port/sysfile.c
@@ -608,11 +608,14 @@
volatile struct { Chan *c; } c;
vlong off;
- if(waserror())
+ if(waserror()){
+ print("rread fd %d va 0x%p n %d offp %lld fdtochan failed: %r\n", fd, va, n, offp);
return -1;
+ }
c.c = fdtochan(up->env->fgrp, fd, OREAD, 1, 1);
if(waserror()){
+ print("rread fd %d va 0x%p n %d offp %lld fdtochan failed: %r\n", fd, va, n, offp);
cclose(c.c);
nexterror();
}