summaryrefslogtreecommitdiffstats
path: root/util/shmctl.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-19 21:02:26 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-19 21:02:26 +0800
commit02d481db41afaf95d0ab02f1453aa1dcc7b15d00 (patch)
treeb652d24367d0bef851d5b556d0484c4b4c8c410f /util/shmctl.c
parent15cac7e33642ab071baf60117d201cf25a3d8982 (diff)
downloadpttbbs-02d481db41afaf95d0ab02f1453aa1dcc7b15d00.tar
pttbbs-02d481db41afaf95d0ab02f1453aa1dcc7b15d00.tar.gz
pttbbs-02d481db41afaf95d0ab02f1453aa1dcc7b15d00.tar.bz2
pttbbs-02d481db41afaf95d0ab02f1453aa1dcc7b15d00.tar.lz
pttbbs-02d481db41afaf95d0ab02f1453aa1dcc7b15d00.tar.xz
pttbbs-02d481db41afaf95d0ab02f1453aa1dcc7b15d00.tar.zst
pttbbs-02d481db41afaf95d0ab02f1453aa1dcc7b15d00.zip
make usage of shmctl look better
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2649 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/shmctl.c')
-rw-r--r--util/shmctl.c55
1 files changed, 34 insertions, 21 deletions
diff --git a/util/shmctl.c b/util/shmctl.c
index 9e604386..cdd1ef56 100644
--- a/util/shmctl.c
+++ b/util/shmctl.c
@@ -900,34 +900,47 @@ int testgap(int argc, char *argv[])
return 0;
}
+int dummy(int argc, char *argv[])
+{
+ return 0;
+}
+
struct {
int (*func)(int, char **);
char *cmd, *descript;
-} cmd[] =
- { {utmpfix, "utmpfix", "clear dead userlist entry"},
- {utmpsortd, "utmpsortd", "utmp sorting daemon"},
- {utmpstatus, "utmpstatus", "list utmpstatus"},
- {utmpreset, "utmpreset", "SHM->busystate=0"},
- {utmpwatch, "utmpwatch", "to see if busystate is always 1 then fix it"},
- {utmpnum, "utmpnum", "print SHM->number for snmpd"},
- {showglobal, "showglobal", "show GLOBALVAR[]"},
- {setglobal, "setglobal", "set GLOBALVAR[]"},
- {listpid, "listpid", "list all pids of mbbsd"},
- {listbrd, "listbrd", "list board info in SHM"},
+} cmd[] = {
+ {dummy, "\b\b\b\bStart daemon:", ""},
+ {utmpsortd, "utmpsortd", "utmp sorting daemon"},
#ifdef OUTTA_TIMER
- {timed, "timed", "time daemon for OUTTA_TIMER"},
+ {timed, "timed", "time daemon for OUTTA_TIMER"},
#endif
#ifdef NOKILLWATERBALL
- {nkwbd, "nkwbd", "NOKillWaterBall daemon"},
+ {nkwbd, "nkwbd", "NOKillWaterBall daemon"},
#endif
- {bBMC, "bBMC", "build BM cache"},
- {SHMinit, "SHMinit", "initialize SHM (including uhash_loader)"},
- {hotboard, "hotboard", "list boards of most bfriends"},
- {usermode, "usermode", "list #users in the same mode"},
- {torb, "reloadbcache", "reload bcache"},
- {rlfcache, "reloadfcache", "reload fcache"},
- {testgap, "testgap", "test gap"},
- {NULL, NULL, NULL} };
+
+ {dummy, "\b\b\b\bBuild cache/fix tool:", ""},
+ {torb, "reloadbcache", "reload bcache"},
+ {rlfcache, "reloadfcache", "reload fcache"},
+ {bBMC, "bBMC", "build BM cache"},
+ {utmpfix, "utmpfix", "clear dead userlist entry & kick idle user"},
+ {utmpreset, "utmpreset", "SHM->busystate=0"},
+ {utmpwatch, "utmpwatch", "to see if busystate is always 1 then fix it"},
+
+ {dummy, "\b\b\b\bShow info:", ""},
+ {utmpnum, "utmpnum", "print SHM->number for snmpd"},
+ {utmpstatus, "utmpstatus", "list utmpstatus"},
+ {listpid, "listpid", "list all pids of mbbsd"},
+ {listbrd, "listbrd", "list board info in SHM"},
+ {hotboard, "hotboard", "list boards of most bfriends"},
+ {usermode, "usermode", "list #users in the same mode"},
+ {testgap, "testgap", "test SHM->gap zeroness"},
+
+ {dummy, "\b\b\b\bMisc:", ""},
+ {showglobal, "showglobal", "show GLOBALVAR[]"},
+ {setglobal, "setglobal", "set GLOBALVAR[]"},
+ {SHMinit, "SHMinit", "initialize SHM (including uhash_loader)"},
+ {NULL, NULL, NULL}
+};
extern char ** environ;