[gnome-software] trivial: Do not always dump profiling infomation when using gnome-software-cmd



commit 3146c9172058551f1ae95a92148c06946e103ca3
Author: Richard Hughes <richard hughsie com>
Date:   Wed Apr 26 15:10:55 2017 +0100

    trivial: Do not always dump profiling infomation when using gnome-software-cmd

 lib/gs-cmd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/lib/gs-cmd.c b/lib/gs-cmd.c
index 2859f82..3477ade 100644
--- a/lib/gs-cmd.c
+++ b/lib/gs-cmd.c
@@ -191,6 +191,7 @@ main (int argc, char **argv)
        AsProfile *profile = NULL;
        GOptionContext *context;
        gboolean prefer_local = FALSE;
+       gboolean profile_enable = FALSE;
        gboolean ret;
        gboolean show_results = FALSE;
        gboolean verbose = FALSE;
@@ -229,6 +230,8 @@ main (int argc, char **argv)
                  "Only load specific plugins", NULL },
                { "verbose", '\0', 0, G_OPTION_ARG_NONE, &verbose,
                  "Show verbose debugging information", NULL },
+               { "profile", '\0', 0, G_OPTION_ARG_NONE, &profile_enable,
+                 "Show profiling information", NULL },
                { NULL}
        };
 
@@ -515,7 +518,7 @@ main (int argc, char **argv)
                        gs_cmd_show_results_categories (categories);
        }
 out:
-       if (profile != NULL)
+       if (profile_enable)
                as_profile_dump (profile);
        g_option_context_free (context);
        return status;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]