Fix problem with --showcmd and callbacks that verify

David reports:

I'm using "fio --showcmd file.job" to convert a script to plain
commandline arguments and this fails if the directory specified in job
file does not exist. While this has to be an error if the job is being
executed, it should not be in context of --showcmd.

To reproduce:
$ cat job.fio
[global]
directory=/x

$ fio --showcmd job.fio
fio: /x is not a directory
fio: failed parsing directory=/x
fio: job global dropped

Expected output:
fio --directory=/x

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/fio.h b/fio.h
index e7d5c27..0d7fbeb 100644
--- a/fio.h
+++ b/fio.h
@@ -420,6 +420,7 @@
 extern void add_job_opts(const char **, int);
 extern char *num2str(unsigned long, int, int, int, int);
 extern int ioengine_load(struct thread_data *);
+extern int parse_dryrun(void);
 
 extern uintptr_t page_mask;
 extern uintptr_t page_size;
diff --git a/init.c b/init.c
index 1afc341..bf54e95 100644
--- a/init.c
+++ b/init.c
@@ -915,6 +915,12 @@
 
 	return buf;
 }
+
+int parse_dryrun(void)
+{
+	return dump_cmdline || parse_only;
+}
+
 /*
  * Adds a job to the list of things todo. Sanitizes the various options
  * to make sure we don't have conflicts, and initializes various
@@ -939,7 +945,7 @@
 	/*
 	 * if we are just dumping the output command line, don't add the job
 	 */
-	if (dump_cmdline || parse_only) {
+	if (parse_dryrun()) {
 		put_job(td);
 		return 0;
 	}
@@ -1944,7 +1950,7 @@
 	fio_options_free(&def_thread);
 
 	if (!thread_number) {
-		if (dump_cmdline || parse_only)
+		if (parse_dryrun())
 			return 0;
 		if (exec_profile)
 			return 0;
diff --git a/options.c b/options.c
index caf89d3..a20b5c5 100644
--- a/options.c
+++ b/options.c
@@ -777,6 +777,9 @@
 	struct thread_data *td = data;
 	struct stat sb;
 
+	if (parse_dryrun())
+		return 0;
+
 	if (lstat(td->o.directory, &sb) < 0) {
 		int ret = errno;