file could reveal a little bit more when something goes wrong Reference: /n/sources/patch/applied/file-diag Date: Sat Feb 7 16:20:09 CET 2009 Signed-off-by: forsyth@terzarima.net --- /sys/src/cmd/file.c Sat Feb 7 16:19:26 2009 +++ /sys/src/cmd/file.c Sat Feb 7 16:19:21 2009 @@ -260,7 +260,7 @@ } fname = file; if ((fd = open(file, OREAD)) < 0) { - print("cannot open\n"); + print("cannot open: %r\n"); return; } filetype(fd); @@ -346,7 +346,7 @@ /* may be reading a pipe on standard input */ nbuf = readn(fd, buf, sizeof(buf)-1); if(nbuf < 0) { - print("cannot read\n"); + print("cannot read: %r\n"); return; } if(nbuf == 0) {