changeset: 2136:2b52f3aa9d06
user: Kris Maglione <jg_AT_suckless.org>
date: Thu May 24 16:03:15 2007 -0400
summary: Alias 'wmiir remove' to 'wmiir rm'
diff -r 67430cd70624 -r 2b52f3aa9d06 cmd/wmiir.c
--- a/cmd/wmiir.c Sun May 20 21:25:47 2007 -0400
+++ b/cmd/wmiir.c Thu May 24 16:03:15 2007 -0400
@@ -14,7 +14,7 @@ static void
static void
usage() {
fprintf(stderr,
- "usage: %1$s [-a <address>] {create | read | ls [-ld] | remove | write} <file>\n"
+ "usage: %1$s [-a <address>] {create | read | ls [-ld] | remove | rm | write} <file>\n"
" %1$s [-a <address>] xwrite <file> <data>\n"
" %1$s -v\n", argv0);
exit(1);
@@ -29,7 +29,7 @@ write_data(IxpCFid *fid, char *name) {
buf = ixp_emalloc(fid->iounit);;
do {
len = read(0, buf, fid->iounit);
- if(len >= 0 && ixp_write(fid, buf, len) != len)
+ if(len > 0 && ixp_write(fid, buf, len) != len)
fatal("cannot write file '%s': %s\n", name, errstr);
} while(len > 0);
@@ -287,6 +287,7 @@ struct exectab {
{"read", xread},
{"create", xcreate},
{"remove", xremove},
+ {"rm", xremove},
{"ls", xls},
{0, 0}
};
Received on Fri Jun 01 2007 - 03:10:33 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:08 UTC