diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-13 15:09:39 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-13 15:09:39 +0200 |
commit | 8e11ff283f1e7c36b23e6e52c2ab0ca12a7713f9 (patch) | |
tree | 21ae354f7121d196046b6b9c36a18232afb38e43 /sys/src/cmd/cwfs/dentry.c | |
parent | 53f5bdfd06cce8093de005b8d706b752d3567cfa (diff) |
cwfs: make /srv/cwfs.cmd redable to receive command output
before, cwfs would print everything to /dev/cons. this change
will redirect the output of commands to the /srv/cwfs.cmd pipe
so one can use:
con -C /srv/cwfs.cmd
and not have the fish for the output in /dev/kmesg.
use standard error (/dev/cons) for unsolicited messages as
there is not always a reader on the command file.
Diffstat (limited to 'sys/src/cmd/cwfs/dentry.c')
-rw-r--r-- | sys/src/cmd/cwfs/dentry.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/cmd/cwfs/dentry.c b/sys/src/cmd/cwfs/dentry.c index 35f6a38aa..e34090e4c 100644 --- a/sys/src/cmd/cwfs/dentry.c +++ b/sys/src/cmd/cwfs/dentry.c @@ -56,7 +56,7 @@ rel2abs(Iobuf *p, Dentry *d, Off a, int tag, int putb, int uid) Device *dev; if(a < 0) { - print("rel2abs: neg offset\n"); + fprint(2, "rel2abs: neg offset\n"); if(putb) putbuf(p); return 0; @@ -111,7 +111,7 @@ rel2abs(Iobuf *p, Dentry *d, Off a, int tag, int putb, int uid) putbuf(p); /* quintuple-indirect blocks not implemented. */ - print("rel2abs: no %d-deep indirect\n", NIBLOCK+1); + fprint(2, "rel2abs: no %d-deep indirect\n", NIBLOCK+1); return 0; } @@ -186,10 +186,10 @@ indfetch(Device* d, Off qpath, Off addr, Off a, int itag, int tag, int uid) bp = getbuf(d, addr, Brd); if(!bp || checktag(bp, itag, qpath)) { if(!bp) { - print("ind fetch bp = 0\n"); + fprint(2, "ind fetch bp = 0\n"); return 0; } - print("ind fetch tag\n"); + fprint(2, "ind fetch tag\n"); putbuf(bp); return 0; } |