Add more job info

Adds a specific command to be sent when a job is received by
the backend. Helps fill out the GUI fields for job values.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/server.c b/server.c
index a2db9dd..490c277 100644
--- a/server.c
+++ b/server.c
@@ -52,6 +52,7 @@
 	"STOP",
 	"DISK_UTIL",
 	"RUN",
+	"ADD_JOB",
 };
 
 const char *fio_server_op(unsigned int op)
@@ -801,6 +802,28 @@
 	}
 }
 
+void fio_server_send_add_job(struct thread_options *o, const char *ioengine)
+{
+	struct cmd_add_job_pdu pdu;
+	int i;
+
+	strcpy((char *) pdu.jobname, o->name);
+	strcpy((char *) pdu.ioengine, ioengine);
+
+	pdu.iodepth		= cpu_to_le32(o->iodepth);
+	pdu.rw			= cpu_to_le32(o->td_ddir);
+
+	for (i = 0; i < 2; i++) {
+		pdu.min_bs[i]	= cpu_to_le32(o->min_bs[i]);
+		pdu.max_bs[i]	= cpu_to_le32(o->max_bs[i]);
+	}
+
+	pdu.numjobs		= cpu_to_le32(o->numjobs);
+	pdu.group_reporting	= cpu_to_le32(o->group_reporting);
+
+	fio_net_send_cmd(server_fd, FIO_NET_CMD_ADD_JOB, &pdu, sizeof(pdu), 0);
+}
+
 int fio_server_log(const char *format, ...)
 {
 	char buffer[1024];