-static int diecmd(UAContext *ua, const char *cmd);
-static int jobscmd(UAContext *ua, const char *cmd);
-static int filesetscmd(UAContext *ua, const char *cmd);
-static int clientscmd(UAContext *ua, const char *cmd);
-static int msgscmd(UAContext *ua, const char *cmd);
-static int poolscmd(UAContext *ua, const char *cmd);
-static int storagecmd(UAContext *ua, const char *cmd);
-static int defaultscmd(UAContext *ua, const char *cmd);
-static int typescmd(UAContext *ua, const char *cmd);
-static int backupscmd(UAContext *ua, const char *cmd);
-static int levelscmd(UAContext *ua, const char *cmd);
-static int getmsgscmd(UAContext *ua, const char *cmd);
-
-struct cmdstruct { const char *key; int (*func)(UAContext *ua, const char *cmd); const char *help; };
-static struct cmdstruct commands[] = {
- { NT_(".backups"), backupscmd, NULL},
- { NT_(".clients"), clientscmd, NULL},
- { NT_(".defaults"), defaultscmd, NULL},
- { NT_(".die"), diecmd, NULL},
- { NT_(".exit"), quit_cmd, NULL},
- { NT_(".filesets"), filesetscmd, NULL},
- { NT_(".help"), qhelp_cmd, NULL},
- { NT_(".jobs"), jobscmd, NULL},
- { NT_(".levels"), levelscmd, NULL},
- { NT_(".messages"), getmsgscmd, NULL},
- { NT_(".msgs"), msgscmd, NULL},
- { NT_(".pools"), poolscmd, NULL},
- { NT_(".quit"), quit_cmd, NULL},
- { NT_(".status"), qstatus_cmd, NULL},
- { NT_(".storage"), storagecmd, NULL},
- { NT_(".types"), typescmd, NULL}
+static bool diecmd(UAContext *ua, const char *cmd);
+static bool jobscmd(UAContext *ua, const char *cmd);
+static bool filesetscmd(UAContext *ua, const char *cmd);
+static bool clientscmd(UAContext *ua, const char *cmd);
+static bool msgscmd(UAContext *ua, const char *cmd);
+static bool poolscmd(UAContext *ua, const char *cmd);
+static bool storagecmd(UAContext *ua, const char *cmd);
+static bool defaultscmd(UAContext *ua, const char *cmd);
+static bool typescmd(UAContext *ua, const char *cmd);
+static bool backupscmd(UAContext *ua, const char *cmd);
+static bool levelscmd(UAContext *ua, const char *cmd);
+static bool getmsgscmd(UAContext *ua, const char *cmd);
+static bool volstatuscmd(UAContext *ua, const char *cmd);
+static bool mediatypescmd(UAContext *ua, const char *cmd);
+static bool locationscmd(UAContext *ua, const char *cmd);
+static bool mediacmd(UAContext *ua, const char *cmd);
+static bool aopcmd(UAContext *ua, const char *cmd);
+
+static bool dot_bvfs_lsdirs(UAContext *ua, const char *cmd);
+static bool dot_bvfs_lsfiles(UAContext *ua, const char *cmd);
+static bool dot_bvfs_update(UAContext *ua, const char *cmd);
+
+static bool api_cmd(UAContext *ua, const char *cmd);
+static bool sql_cmd(UAContext *ua, const char *cmd);
+static bool dot_quit_cmd(UAContext *ua, const char *cmd);
+static bool dot_help_cmd(UAContext *ua, const char *cmd);
+
+struct cmdstruct { const char *key; bool (*func)(UAContext *ua, const char *cmd); const char *help;const bool use_in_rs;};
+static struct cmdstruct commands[] = { /* help */ /* can be used in runscript */
+ { NT_(".api"), api_cmd, NULL, false},
+ { NT_(".backups"), backupscmd, NULL, false},
+ { NT_(".clients"), clientscmd, NULL, true},
+ { NT_(".defaults"), defaultscmd, NULL, false},
+ { NT_(".die"), diecmd, NULL, false},
+ { NT_(".exit"), dot_quit_cmd, NULL, false},
+ { NT_(".filesets"), filesetscmd, NULL, false},
+ { NT_(".help"), dot_help_cmd, NULL, false},
+ { NT_(".jobs"), jobscmd, NULL, true},
+ { NT_(".levels"), levelscmd, NULL, false},
+ { NT_(".messages"), getmsgscmd, NULL, false},
+ { NT_(".msgs"), msgscmd, NULL, false},
+ { NT_(".pools"), poolscmd, NULL, true},
+ { NT_(".quit"), dot_quit_cmd, NULL, false},
+ { NT_(".sql"), sql_cmd, NULL, false},
+ { NT_(".status"), dot_status_cmd, NULL, false},
+ { NT_(".storage"), storagecmd, NULL, true},
+ { NT_(".volstatus"), volstatuscmd, NULL, true},
+ { NT_(".media"), mediacmd, NULL, true},
+ { NT_(".mediatypes"), mediatypescmd, NULL, true},
+ { NT_(".locations"), locationscmd, NULL, true},
+ { NT_(".actiononpurge"),aopcmd, NULL, true},
+ { NT_(".bvfs_lsdirs"), dot_bvfs_lsdirs, NULL, true},
+ { NT_(".bvfs_lsfiles"),dot_bvfs_lsfiles,NULL, true},
+ { NT_(".bvfs_update"), dot_bvfs_update, NULL, true},
+ { NT_(".types"), typescmd, NULL, false}