#include "../blktrace_api.h"
#include "../os/os.h"
#include "../log.h"
-#include "../lib/linux-dev-lookup.h"
+#include "../oslib/linux-dev-lookup.h"
#define TRACE_FIFO_SIZE 8192
static int output_ascii = 1;
static char *filename;
+static char **add_opts;
+static int n_add_opts;
+
/*
* Collapse defaults
*/
printf("\n");
}
+ if (n_add_opts)
+ for (i = 0; i < n_add_opts; i++)
+ printf("%s\n", add_opts[i]);
+
printf("\n");
return 0;
}
return 1;
}
-static void check_merges(struct btrace_pid *p, struct flist_head *pid_list)
+static void check_merges(struct btrace_pid *p, struct flist_head *pidlist)
{
struct flist_head *e, *tmp;
if (p->ignore)
return;
- flist_for_each_safe(e, tmp, pid_list) {
+ flist_for_each_safe(e, tmp, pidlist) {
struct btrace_pid *pidb;
pidb = flist_entry(e, struct btrace_pid, pid_list);
log_err("\t-c\tCollapse \"identical\" jobs (def=%u)\n", collapse_entries);
log_err("\t-u\tDepth difference for collapse (def=%u)\n", depth_diff);
log_err("\t-x\tRandom difference for collapse (def=%u)\n", random_diff);
+ log_err("\t-a\tAdditional fio option to add to job file\n");
return 1;
}
if (argc < 2)
return usage(argv);
- while ((c = getopt(argc, argv, "t:n:fd:r:RD:c:u:x:")) != -1) {
+ while ((c = getopt(argc, argv, "t:n:fd:r:RD:c:u:x:a:")) != -1) {
switch (c) {
case 'R':
set_rate = 1;
case 'x':
random_diff = atoi(optarg);
break;
+ case 'a':
+ add_opts = realloc(add_opts, (n_add_opts + 1) * sizeof(char *));
+ add_opts[n_add_opts] = strdup(optarg);
+ n_add_opts++;
+ break;
case '?':
default:
return usage(argv);