control:fanctl: `dump` option only for JSON

Only show the `dump` option when the use of JSON is enabled. There is no
support for creating a fan control dump of the flight recorder, etc.. in
YAML based fan control configurations.

Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Change-Id: I7602fb4f45441058831a023a8d62dbecaf94574b
diff --git a/control/fanctl.cpp b/control/fanctl.cpp
index 909ea0e..cd37ca4 100644
--- a/control/fanctl.cpp
+++ b/control/fanctl.cpp
@@ -672,6 +672,7 @@
     cmdResume->set_help_flag("-h, --help", strHelp);
     cmdResume->require_option(0);
 
+#ifdef CONTROL_USE_JSON
     // Dump method
     auto cmdDump = commands->add_subcommand(
         "dump", "Dump the FlightRecorder diagnostic log");
@@ -679,7 +680,7 @@
                            "Dump the FlightRecorder diagnostic log");
     cmdDump->require_option(0);
 
-#ifdef CONTROL_USE_JSON
+    // Query dump
     auto cmdDumpQuery =
         commands->add_subcommand("query_dump", "Query the dump file");
 
@@ -736,11 +737,11 @@
         {
             status();
         }
+#ifdef CONTROL_USE_JSON
         else if (app.got_subcommand("dump"))
         {
             dumpFanControl();
         }
-#ifdef CONTROL_USE_JSON
         else if (app.got_subcommand("query_dump"))
         {
             queryDumpFile(dq);