static bool bvfs_parse_arg(UAContext *ua,
DBId_t *pathid, char **path, char **jobid,
+ char **username,
int *limit, int *offset)
{
*pathid=0;
*offset=0;
*path=NULL;
*jobid=NULL;
+ *username=NULL;
for (int i=1; i<ua->argc; i++) {
if (strcasecmp(ua->argk[i], NT_("pathid")) == 0) {
if (strcasecmp(ua->argk[i], NT_("path")) == 0) {
*path = ua->argv[i];
}
+
+ if (strcasecmp(ua->argk[i], NT_("username")) == 0) {
+ *username = ua->argv[i];
+ }
if (strcasecmp(ua->argk[i], NT_("jobid")) == 0) {
if (is_a_number_list(ua->argv[i])) {
{
DBId_t pathid=0;
int limit=2000, offset=0, i;
- char *path=NULL, *jobid=NULL;
+ char *path=NULL, *jobid=NULL, *username=NULL;
char *empty = (char *)"";
- char *fileid, *dirid, *hardlink, *id;
- id = fileid = dirid = hardlink = empty;
+ char *fileid, *dirid, *hardlink;
+ fileid = dirid = hardlink = empty;
- if (!bvfs_parse_arg(ua, &pathid, &path, &jobid,
+ if (!bvfs_parse_arg(ua, &pathid, &path, &jobid, &username,
&limit, &offset))
{
ua->error_msg("Can't find jobid, pathid or path argument\n");
}
Bvfs fs(ua->jcr, ua->db);
+ fs.set_username(username);
fs.set_jobids(jobid);
if ((i = find_arg_with_value(ua, "fileid")) >= 0) {
{
DBId_t pathid=0;
int limit=2000, offset=0;
- char *path=NULL, *jobid=NULL;
+ char *path=NULL, *jobid=NULL, *username=NULL;
char *pattern=NULL;
int i;
- if (!bvfs_parse_arg(ua, &pathid, &path, &jobid,
+ if (!bvfs_parse_arg(ua, &pathid, &path, &jobid, &username,
&limit, &offset))
{
ua->error_msg("Can't find jobid, pathid or path argument\n");
}
Bvfs fs(ua->jcr, ua->db);
+ fs.set_username(username);
fs.set_jobids(jobid);
fs.set_handler(bvfs_result_handler, ua);
fs.set_limit(limit);
{
DBId_t pathid=0;
int limit=2000, offset=0;
- char *path=NULL, *jobid=NULL;
+ char *path=NULL, *jobid=NULL, *username=NULL;
- if (!bvfs_parse_arg(ua, &pathid, &path, &jobid,
+ if (!bvfs_parse_arg(ua, &pathid, &path, &jobid, &username,
&limit, &offset))
{
ua->error_msg("Can't find jobid, pathid or path argument\n");
}
Bvfs fs(ua->jcr, ua->db);
+ fs.set_username(username);
fs.set_jobids(jobid);
fs.set_limit(limit);
fs.set_handler(bvfs_result_handler, ua);
{
DBId_t pathid=0, fnid=0;
int limit=2000, offset=0;
- char *path=NULL, *jobid=NULL, *client=NULL;
+ char *path=NULL, *jobid=NULL, *client=NULL, *username=NULL;
bool copies=false, versions=false;
- if (!bvfs_parse_arg(ua, &pathid, &path, &jobid,
+ if (!bvfs_parse_arg(ua, &pathid, &path, &jobid, &username,
&limit, &offset))
{
ua->error_msg("Can't find jobid, pathid or path argument\n");
if (!db_accurate_get_jobids(ua->jcr, ua->db, &jr, &tempids)) {
return true;
}
- jobids.cat(tempids);
+ jobids.add(tempids);
}
ua->send_msg("%s\n", jobids.list);