commit 45a5bdf82366bcf90b53554c78885d876d24aeaa
parent 6fbcbb537cfe636dde9e1d0c7796bce4639ac654
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Sat, 4 Feb 2006 16:13:11 +0200
removed usage info from ctl files, Uriel will read the code to check what commands each ctl file takes to write the man pages
Diffstat:
2 files changed, 5 insertions(+), 39 deletions(-)
diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c
@@ -60,7 +60,7 @@
*/
static char E9pversion[] = "9P version not supported";
-/*static char Enoperm[] = "permission denied";*/
+static char Enoperm[] = "permission denied";
static char Enofid[] = "fid not assigned";
static char Enofile[] = "file not found";
static char Enomode[] = "mode not supported";
@@ -69,24 +69,6 @@ static char Enocommand[] = "command not supported";
const char *err;
-static char Droot_ctlusage[] =
- "quit - quits the wm\n"
- "select [next | prev] [index] - selects the page\n"
- "attach - attaches the client\n"
- "detached - shows detached clients\n"
- "pager - shows the pager\n";
-
-static char Dpage_ctlusage[] =
- "exec <command> - executes command in page\n"
- "select [next | prev] [index] - selects the area\n";
-
-static char Darea_ctlusage[] =
- "select [next | prev] [index] - selects the client\n";
-
-static char Dclient_ctlusage[] =
- "detach - detaches the client\n"
- "kill - kills the client\n";
-
/* IXP stuff */
unsigned long long
@@ -455,7 +437,7 @@ type_to_stat(Stat *stat, char *name, Qid *dir)
return mkstat(stat, dir, name, 0, DMDIR | DMREAD | DMEXEC);
break;
case Fctl:
- return mkstat(stat, dir, name, 0, DMREAD | DMWRITE);
+ return mkstat(stat, dir, name, 0, DMWRITE);
break;
case Fevent:
return mkstat(stat, dir, name, 0, DMREAD);
@@ -716,20 +698,8 @@ xread(IXPConn *c, Fcall *fcall)
p = ixp_enc_stat(p, &stat);
break;
case Fctl:
- {
- char *us = nil;
- switch(m->qid.dtype) {
- case Droot: us = Droot_ctlusage; break;
- case Dpage: us = Dpage_ctlusage; break;
- case Darea: us = Darea_ctlusage; break;
- case Dclient: us = Dclient_ctlusage; break;
- }
- if(!us)
- return Enofile;
- fcall->count = strlen(us);
- memcpy(p, us, fcall->count);
+ return Enoperm;
break;
- }
case Ffont:
if((fcall->count = strlen(def.font)))
memcpy(p, def.font, fcall->count);
diff --git a/cmd/wmiibar.c b/cmd/wmiibar.c
@@ -88,9 +88,6 @@ static char *version[] = {
" (C)opyright MMIV-MMVI Anselm R. Garbe\n", 0
};
-static char ctlusage[] =
- "quit - quits the bar\n";
-
static void
usage()
{
@@ -474,7 +471,7 @@ type_to_stat(Stat *stat, char *name, Qid *dir)
return mkstat(stat, dir, name, 0, DMDIR | DMREAD | DMEXEC);
break;
case Fctl:
- return mkstat(stat, dir, name, 0, DMREAD | DMWRITE);
+ return mkstat(stat, dir, name, 0, DMWRITE);
break;
case Fevent:
return mkstat(stat, dir, name, 0, DMREAD);
@@ -615,8 +612,7 @@ xread(IXPConn *c, Fcall *fcall)
p = ixp_enc_stat(p, &stat);
break;
case Fctl:
- fcall->count = strlen(ctlusage);
- memcpy(p, ctlusage, fcall->count);
+ return Enoperm;
break;
case Ffont:
if((fcall->count = strlen(font)))