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);
{ 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},
#endif
+/*
+ * Can use an argument to filter on JobType
+ * .jobs [type=B]
+ */
static bool jobscmd(UAContext *ua, const char *cmd)
{
JOB *job;
+ uint32_t type = 0;
+ int pos;
+ if ((pos = find_arg_with_value(ua, "type")) >= 0) {
+ type = ua->argv[pos][0];
+ }
LockRes();
foreach_res(job, R_JOB) {
- if (acl_access_ok(ua, Job_ACL, job->name())) {
- ua->send_msg("%s\n", job->name());
+ if (!type || type == job->JobType) {
+ if (acl_access_ok(ua, Job_ACL, job->name())) {
+ ua->send_msg("%s\n", job->name());
+ }
}
}
UnlockRes();
return true;
}
+static bool aopcmd(UAContext *ua, const char *cmd)
+{
+ ua->send_msg("None\n");
+ ua->send_msg("Truncate\n");
+ return true;
+}
static bool typescmd(UAContext *ua, const char *cmd)
{
return true;
}
-
/*
* If this command is called, it tells the director that we
* are a program that wants a sort of API, and hence,